Exemplo n.º 1
0
 public function addAlias($alias, $cmdline, $force)
 {
     if ($this->owner->getServer()->getCommandMap()->getCommand($alias) !== null) {
         if ($force) {
             MPMU::rmCommand($this->owner->getServer(), $alias);
         } else {
             return false;
         }
     }
     $this->aliases[$alias] = new AliasCmd($this->owner, $alias, $cmdline);
     return true;
 }
Exemplo n.º 2
0
 public function onEnable()
 {
     MPMU::rmCommand($this->getServer(), "give");
     MPMU::addCommand($this, $this, "give", ["description" => "Give stuff", "usage" => "/gift [player] [object:meta] [amount]"]);
 }
Exemplo n.º 3
0
 public function onEnable()
 {
     MPMU::rmCommand($this->getServer(), "list");
     MPMU::addCommand($this, $this, "list", ["description" => "Replaced List command", "usage" => "/list"]);
 }