mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 12:27:51 +00:00
Fixed whitelist command & auto-disconnect
This commit is contained in:
parent
e76734628a
commit
a7ec472ef4
@ -156,7 +156,7 @@ class ConsoleAPI{
|
|||||||
$this->server->api->setProperty("white-list", false);
|
$this->server->api->setProperty("white-list", false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console("[INFO] Usage: /whitelist <on | off | add | reload | list> [username]");
|
console("[INFO] Usage: /whitelist <on | off | add | remove | reload | list> [username]");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -85,12 +85,12 @@ class Session{
|
|||||||
$this->server->deleteEvent($ev[0], $ev[1]);
|
$this->server->deleteEvent($ev[0], $ev[1]);
|
||||||
}
|
}
|
||||||
$this->eventHandler("You have been kicked. Reason: ".$reason, "onChat");
|
$this->eventHandler("You have been kicked. Reason: ".$reason, "onChat");
|
||||||
|
$this->dataPacket(MC_DISCONNECT);
|
||||||
$this->connected = false;
|
$this->connected = false;
|
||||||
if($msg === true){
|
if($msg === true){
|
||||||
$this->server->trigger("onChat", $this->username." left the game");
|
$this->server->trigger("onChat", $this->username." left the game");
|
||||||
}
|
}
|
||||||
console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason);
|
console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason);
|
||||||
$this->dataPacket(MC_DISCONNECT);
|
|
||||||
$this->server->api->player->remove($this->CID);
|
$this->server->api->player->remove($this->CID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user