mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Fixed things
This commit is contained in:
parent
cef4347a02
commit
991436993f
@ -326,7 +326,7 @@ class BanAPI{
|
||||
$username = strtolower($username);
|
||||
if($this->isOp($username)){
|
||||
return true;
|
||||
}elseif($this->server->api->dhandle("api.ban.whitelist.check", $ip) === false){
|
||||
}elseif($this->server->api->dhandle("api.ban.whitelist.check", $username) === false){
|
||||
return true;
|
||||
}elseif($this->whitelist->exists($username)){
|
||||
return true;
|
||||
|
@ -576,11 +576,6 @@ class Player{
|
||||
if($pitch === false){
|
||||
$pitch = $this->entity->yaw;
|
||||
}
|
||||
if($pos instanceof Position and $pos->level !== $this->level){
|
||||
$this->level = $pos->level;
|
||||
$this->chunksLoaded = array();
|
||||
$terrain = true;
|
||||
}
|
||||
$this->lastCorrect = $pos;
|
||||
$this->entity->fallY = false;
|
||||
$this->entity->fallStart = false;
|
||||
@ -588,6 +583,20 @@ class Player{
|
||||
$this->entity->resetSpeed();
|
||||
$this->entity->updateLast();
|
||||
$this->entity->calculateVelocity();
|
||||
if($pos instanceof Position and $pos->level !== $this->level){
|
||||
foreach($this->server->api->entity->getAll($this->level) as $e){
|
||||
if($e !== $this->entity){
|
||||
$this->dataPacket(MC_REMOVE_ENTITY, array(
|
||||
"eid" => $e->eid,
|
||||
));
|
||||
}
|
||||
}
|
||||
$this->level = $pos->level;
|
||||
$this->chunksLoaded = array();
|
||||
$this->server->api->entity->spawnToAll($this->level, $this->eid);
|
||||
$this->server->api->entity->spawnAll($this);
|
||||
$terrain = true;
|
||||
}
|
||||
if($terrain === true){
|
||||
$this->orderChunks();
|
||||
$this->getNextChunk();
|
||||
|
@ -123,7 +123,7 @@ class RCONInstance extends Thread{
|
||||
}
|
||||
@socket_set_block($client);
|
||||
$size = Utils::readLInt($d);
|
||||
if($size < 0){
|
||||
if($size < 0 or $size > 65535){
|
||||
return false;
|
||||
}
|
||||
$requestID = Utils::readLInt(socket_read($client, 4));
|
||||
|
Loading…
x
Reference in New Issue
Block a user