mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Added disconnect packet
This commit is contained in:
parent
adbf56d754
commit
0b70b36ee1
@ -74,8 +74,6 @@ class ChunkParser{
|
||||
}
|
||||
|
||||
private function getOffset($X, $Z, $sectors = 21){
|
||||
//$info = $this->getOffsetPosition($X, $Z);
|
||||
//return 4096 + (($info[1] * $info[0]) << 12) + (($info[2] * $data[0]) << 16);
|
||||
return 0x1000 + (($Z * $sectors) << 12) + (($X * $sectors) << 16);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,11 @@ class Session{
|
||||
$this->server->deleteEvent($ev);
|
||||
}
|
||||
$this->eventHandler("You have been kicked. Reason: ".$reason, "onChat");
|
||||
$this->dataPacket(MC_LOGIN_STATUS, array(
|
||||
"status" => 1,
|
||||
));
|
||||
$this->dataPacket(MC_DISCONNECT);
|
||||
|
||||
$this->connected = false;
|
||||
if($msg === true){
|
||||
$this->server->trigger("onChat", $this->username." left the game");
|
||||
|
Loading…
x
Reference in New Issue
Block a user