mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
Fixed reason on kick message
This commit is contained in:
@@ -51,12 +51,8 @@ class KickCommand extends VanillaCommand{
|
||||
$name = array_shift($args);
|
||||
$reason = trim(implode(" ", $args));
|
||||
|
||||
if($reason === ""){
|
||||
$reason = "Kicked by an operator.";
|
||||
}
|
||||
|
||||
if(($player = $sender->getServer()->getPlayer($name)) instanceof Player){
|
||||
$player->kick("Kicked by admin.");
|
||||
$player->kick($reason);
|
||||
}else{
|
||||
$sender->sendMessage($name . " not found.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user