mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 16:45:13 +00:00
Fixed crash on /ban
This commit is contained in:
@ -58,7 +58,7 @@ class BanCommand extends VanillaCommand{
|
||||
$player->kick($reason !== "" ? "Banned by admin. Reason: " . $reason : "Banned by admin.");
|
||||
}
|
||||
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("%commands.ban.success", [$player->getName()]));
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("%commands.ban.success", [$player !== null ? $player->getName() : $name]));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user