Holy debug code!

This commit is contained in:
Shaun Bennett 2015-02-10 13:27:29 -05:00
parent 336ba50f59
commit 6b3f2114f2

View File

@ -1303,29 +1303,4 @@ public class GameLobbyManager implements Listener, IPacketHandler
event.setCancelled(true);
}
/**
* DEBUG
*/
@EventHandler
public void command(PlayerCommandPreprocessEvent event)
{
Player player = event.getPlayer();
if (event.getMessage().startsWith("/enable"))
{
player.setGameMode(GameMode.CREATIVE);
player.setFlying(true);
player.setFlySpeed(0.1f);
((CraftPlayer) player).getHandle().spectating = true;
((CraftPlayer) player).getHandle().k = false;
}
else if (event.getMessage().startsWith("/disable"))
{
player.setGameMode(GameMode.SURVIVAL);
player.setFlying(false);
player.setFlySpeed(0.1f);
((CraftPlayer) player).getHandle().spectating = false;
((CraftPlayer) player).getHandle().k = true;
}
}
}