mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Schedule player kick so it can read the reason
This commit is contained in:
parent
230a3c00fc
commit
8532f53f8e
@ -175,7 +175,9 @@ class BanAPI{
|
||||
}else{
|
||||
$reason = implode(" ", $params);
|
||||
$reason = $reason == "" ? "No reason":$reason;
|
||||
$player->close("You have been kicked: ".$reason);
|
||||
|
||||
$this->server->schedule(60, array($player, "close"), "You have been kicked: ".$reason); //Forces a kick
|
||||
$player->blocked = true;
|
||||
if($issuer instanceof Player){
|
||||
$this->server->api->chat->broadcast($player->username." has been kicked by ".$issuer->username.": $reason\n");
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user