Migrate final remaining EnumTrait users to native enums

This commit is contained in:
Dylan K. Taylor
2023-09-08 10:34:12 +01:00
parent 14f2368454
commit 7ce33d9375
15 changed files with 124 additions and 141 deletions

View File

@ -783,7 +783,7 @@ class InGamePacketHandler extends PacketHandler{
public function handleSetPlayerGameType(SetPlayerGameTypePacket $packet) : bool{
$gameMode = $this->session->getTypeConverter()->protocolGameModeToCore($packet->gamemode);
if($gameMode === null || !$gameMode->equals($this->player->getGamemode())){
if($gameMode !== $this->player->getGamemode()){
//Set this back to default. TODO: handle this properly
$this->session->syncGameMode($this->player->getGamemode(), true);
}