Player: fix possible comparison bug in setGamemode()

This commit is contained in:
Dylan K. Taylor 2019-08-01 18:57:47 +01:00
parent eaf5226f08
commit 4818e04540

View File

@ -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;
}