diff --git a/src/main/java/com/minelittlepony/unicopia/command/CommandOverrideGameMode.java b/src/main/java/com/minelittlepony/unicopia/command/CommandOverrideGameMode.java index e4c08765..986f9cea 100644 --- a/src/main/java/com/minelittlepony/unicopia/command/CommandOverrideGameMode.java +++ b/src/main/java/com/minelittlepony/unicopia/command/CommandOverrideGameMode.java @@ -1,6 +1,6 @@ package com.minelittlepony.unicopia.command; -import com.minelittlepony.unicopia.player.IPlayer; +import com.minelittlepony.unicopia.player.PlayerSpeciesList; import net.minecraft.command.CommandException; import net.minecraft.command.CommandGameMode; @@ -37,7 +37,7 @@ class CommandOverrideGameMode extends CommandGameMode { boolean flying = player.capabilities.isFlying; player.setGameType(m); - player.capabilities.isFlying = ((IPlayer)player).getPlayerSpecies().canFly(); + player.capabilities.isFlying = PlayerSpeciesList.instance().getPlayer(player).getPlayerSpecies().canFly(); if (flying != player.capabilities.isFlying) { player.sendPlayerAbilities();