mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Player: lock flight state in spectator mode
players should not be able to stop flying in spectator mode
This commit is contained in:
parent
66e70e5b0e
commit
d1c75da14b
@ -1021,7 +1021,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
|||||||
protected function internalSetGameMode(GameMode $gameMode) : void{
|
protected function internalSetGameMode(GameMode $gameMode) : void{
|
||||||
$this->gamemode = $gameMode;
|
$this->gamemode = $gameMode;
|
||||||
|
|
||||||
$this->allowFlight = $this->isCreative();
|
$this->allowFlight = $this->gamemode->equals(GameMode::CREATIVE());
|
||||||
$this->hungerManager->setEnabled($this->isSurvival());
|
$this->hungerManager->setEnabled($this->isSurvival());
|
||||||
|
|
||||||
if($this->isSpectator()){
|
if($this->isSpectator()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user