mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Player: fix possible comparison bug in setGamemode()
This commit is contained in:
@@ -1117,7 +1117,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function setGamemode(GameMode $gm) : bool{
|
public function setGamemode(GameMode $gm) : bool{
|
||||||
if($this->gamemode === $gm){
|
if($this->gamemode->equals($gm)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user