mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Player gamemode fix
This commit is contained in:
parent
3967c8eec1
commit
5fedf27255
@ -186,9 +186,9 @@ class Entity extends stdClass{
|
||||
$this->close(); //Despawn timer
|
||||
return false;
|
||||
}
|
||||
if(($this->server->gamemode === 0 or $this->server->gamemode === 2) and ($time - $this->spawntime) >= 2){
|
||||
if(($time - $this->spawntime) >= 2){
|
||||
$player = $this->server->query("SELECT EID FROM entities WHERE class == ".ENTITY_PLAYER." AND abs(x - {$this->x}) <= 1.5 AND abs(y - {$this->y}) <= 1.5 AND abs(z - {$this->z}) <= 1.5 LIMIT 1;", true);
|
||||
if($player !== true and $player !== false){
|
||||
if(($player instanceof Entity) and $player->gamemode === SURVIVAL or $player->gamemode === ADVENTURE){
|
||||
if($this->server->api->dhandle("player.pickup", array(
|
||||
"eid" => $player["EID"],
|
||||
"entity" => $this,
|
||||
|
Loading…
x
Reference in New Issue
Block a user