mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed #1962 Fake client-side player entities
This commit is contained in:
parent
1fcfef20b0
commit
9fdafb87b4
@ -2125,6 +2125,10 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->interface->close($this, $reason);
|
||||
$this->server->removePlayer($this);
|
||||
$this->getLevel()->freeAllChunks($this);
|
||||
|
||||
|
||||
parent::close();
|
||||
|
||||
$this->loggedIn = false;
|
||||
|
||||
if(isset($ev) and $this->username != "" and $this->spawned !== false and $ev->getQuitMessage() != ""){
|
||||
@ -2138,8 +2142,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->usedChunks = [];
|
||||
$this->loadQueue = [];
|
||||
unset($this->buffer);
|
||||
|
||||
parent::close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,10 +120,10 @@ namespace pocketmine {
|
||||
$i = array_map("intval", explode(":", trim($hour[0])));
|
||||
@exec("date.exe /T", $date);
|
||||
$j = array_map("intval", explode(substr($date[0], 2, 1), trim($date[0])));
|
||||
$offset = round((mktime($i[0], $i[1], 0, $j[1], $j[0], $j[2]) - $time) / 60) * 60;
|
||||
$offset = @round((mktime($i[0], $i[1], 0, $j[1], $j[0], $j[2]) - $time) / 60) * 60;
|
||||
}else{
|
||||
@exec("date +%s", $t);
|
||||
$offset = round((intval(trim($t[0])) - time()) / 60) * 60;
|
||||
$offset = @round((intval(trim($t[0])) - time()) / 60) * 60;
|
||||
}
|
||||
|
||||
$daylight = (int) date("I");
|
||||
|
Loading…
x
Reference in New Issue
Block a user