mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
Player: fix possible comparison bug in setGamemode()
This commit is contained in:
parent
eaf5226f08
commit
4818e04540
@ -1117,7 +1117,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
* @return bool
|
||||
*/
|
||||
public function setGamemode(GameMode $gm) : bool{
|
||||
if($this->gamemode === $gm){
|
||||
if($this->gamemode->equals($gm)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user