remove admin commands v2 · Z1I42fX5n
foreach(["ban-ip", "ban", "kick"] as $label) {
	$command = $this->getServer()->getCommandMap()->getCommand($label);
	if($command != null)
		$sender->getServer()->getCommandMap()->unregister($command);
	else $sender->sendMessage("$label doesn't exist");
}
  • 4

    7/22/2022, 3:49:45 AM