@EventHandler public void onPlayerStopFlying(PlayerToggleFlightEvent e) { Player p = e.getPlayer(); if (ArenaManager.isPlayerPlaying(p) && ArenaManager.getPlayersArena(p).getState() == Arena.ArenaState.INGAME) { if (!e.isFlying()) { e.setCancelled(true); p.setFlying(true); } } }
@EventHandler public void onPlayerLeave(PlayerQuitEvent e) { Player p = e.getPlayer(); if (ArenaManager.isPlayerPlaying(p)) { e.setQuitMessage(""); Arena arena = ArenaManager.getPlayersArena(p); ArenaManager.leave(arena, p, true); } }