mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Added "player.flying" event, ops can always fly
This commit is contained in:
parent
7b8a27f7b0
commit
eac72bb8ae
2 changed files with 7 additions and 1 deletions
|
|
@ -351,7 +351,7 @@ class Entity extends stdClass{
|
|||
$this->fallY = $y;
|
||||
$this->fallStart = 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 and $this->server->handle("player.flying", $this->player) !== true){
|
||||
$this->player->close("flying");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue