Holy debug code!
This commit is contained in:
parent
336ba50f59
commit
6b3f2114f2
@ -1303,29 +1303,4 @@ public class GameLobbyManager implements Listener, IPacketHandler
|
|||||||
event.setCancelled(true);
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user