disable admin commands · aMxLofrbZ
foreach(["ban-ip", "ban", "kick"] as $label) {
	$command = $this->getServer()->getCommandMap()->getCommand($label);
	if($command instanceof Command)
		$sender->getServer()->getCommandMap()->unregister($command);
	else $sender->sendMessage("$label doesn't exist");
}
  • 5

    7/22/2022, 3:48:51 AM