mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-21 02:44:03 +00:00
Gamemode check for flying
This commit is contained in:
parent
4dd66b450c
commit
6ba7486097
@ -351,7 +351,7 @@ class Entity extends stdClass{
|
|||||||
$this->fallY = $y;
|
$this->fallY = $y;
|
||||||
$this->fallStart = microtime(true);
|
$this->fallStart = microtime(true);
|
||||||
}elseif($this->class === ENTITY_PLAYER and ($this->fallStart + 5) < microtime(true)){
|
}elseif($this->class === ENTITY_PLAYER and ($this->fallStart + 5) < microtime(true)){
|
||||||
if($this->player->gamemode === CREATIVE and $this->server->api->getProperty("allow-flight") !== true){
|
if($this->player->gamemode !== CREATIVE and $this->server->api->getProperty("allow-flight") !== true){
|
||||||
$this->player->close("flying");
|
$this->player->close("flying");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user