Fix bug where a double quote would show when kick reason is not specified.

This commit is contained in:
Michael Yoo 2014-07-13 22:03:54 +09:30
parent 167ee97569
commit 5dfb1fb9d5

View File

@ -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.");
}