mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 21:19:44 +00:00
Schedule player kick so it can read the reason
This commit is contained in:
parent
230a3c00fc
commit
8532f53f8e
1 changed files with 3 additions and 1 deletions
|
|
@ -175,7 +175,9 @@ class BanAPI{
|
||||||
}else{
|
}else{
|
||||||
$reason = implode(" ", $params);
|
$reason = implode(" ", $params);
|
||||||
$reason = $reason == "" ? "No reason":$reason;
|
$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){
|
if($issuer instanceof Player){
|
||||||
$this->server->api->chat->broadcast($player->username." has been kicked by ".$issuer->username.": $reason\n");
|
$this->server->api->chat->broadcast($player->username." has been kicked by ".$issuer->username.": $reason\n");
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue