mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 18:11:52 +00:00
Player scheduled actions get cleaned
This commit is contained in:
parent
5dade755eb
commit
c6c82f7e55
@ -106,7 +106,7 @@ class Player{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function orderChunks(){
|
public function orderChunks(){
|
||||||
if(!($this->entity instanceof Entity)){
|
if(!($this->entity instanceof Entity) or $this->connected === false){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$X = $this->entity->x / 16;
|
$X = $this->entity->x / 16;
|
||||||
@ -128,6 +128,9 @@ class Player{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getNextChunk($repeat = false){
|
public function getNextChunk($repeat = false){
|
||||||
|
if($this->connected === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$c = key($this->chunksOrder);
|
$c = key($this->chunksOrder);
|
||||||
$d = $this->chunksOrder[$c];
|
$d = $this->chunksOrder[$c];
|
||||||
if($c === null or $d > $this->server->api->getProperty("view-distance")){
|
if($c === null or $d > $this->server->api->getProperty("view-distance")){
|
||||||
@ -1301,6 +1304,9 @@ class Player{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function directDataPacket($id, $data = array(), $count = false){
|
public function directDataPacket($id, $data = array(), $count = false){
|
||||||
|
if($this->connected === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$data["id"] = $id;
|
$data["id"] = $id;
|
||||||
$data["sendtime"] = microtime(true);
|
$data["sendtime"] = microtime(true);
|
||||||
if($count === false){
|
if($count === false){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user