Ok so i am unregistering commands and i have come upon the issue where it does not unregister the command aliases how to go about fixing this ? here is my code(taken from LegionPE-theta): PHP: public static function registerAll(Main $main, CommandMap $map){ $cmds = ["tell","help","me","?","msg"]; foreach($cmds as $cmd){ self::unregisterCommand($map, $cmd); } $map->registerAll("c", [ new TellCommand($main, "tell", "Send a player a private message", null, ["msg","w","pm"]), new LangCommand($main, "lang", "Change your language preference!", null), new MeCommand($main, "me", "Shout yourself out!", null), new HelpCommand($main, "help", "See the list of commands!", null, ["?"])]); }
oh yes sorry(also taken from LegionPE-theta): PHP: public static function unregisterCommand(CommandMap $map, $name){ $cmd = $map->getCommand($name); if($cmd instanceof Command){ $cmd->setLabel($name . "_deprecated"); $cmd->unregister($map); return true; } return false; }