mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Fix bug where a double quote would show when kick reason is not specified.
This commit is contained in:
parent
167ee97569
commit
5dfb1fb9d5
@ -53,7 +53,14 @@ class KickCommand extends VanillaCommand{
|
||||
|
||||
if(($player = $sender->getServer()->getPlayer($name)) instanceof Player){
|
||||
$player->kick($reason);
|
||||
Command::broadcastCommandMessage($sender, "Kicked " . $player->getName() . " from the game: '{$reason}'");
|
||||
if(strlen($reason) >= 1)
|
||||
{
|
||||
Command::broadcastCommandMessage($sender, "Kicked " . $player->getName() . " from the game: '{$reason}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
Command::broadcastCommandMessage($sender, "Kicked " . $player->getName() . " from the game.");
|
||||
}
|
||||
}else{
|
||||
$sender->sendMessage($name . " not found.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user