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; }
public function onEnable() { MPMU::rmCommand($this->getServer(), "give"); MPMU::addCommand($this, $this, "give", ["description" => "Give stuff", "usage" => "/gift [player] [object:meta] [amount]"]); }
public function onEnable() { MPMU::rmCommand($this->getServer(), "list"); MPMU::addCommand($this, $this, "list", ["description" => "Replaced List command", "usage" => "/list"]); }