Archiviert
13
0

Add DoubleJumpListener fly detection

Dieser Commit ist enthalten in:
jojo 2020-12-29 21:55:46 +01:00
Ursprung d9217984db
Commit c9f1e3be29

Datei anzeigen

@ -69,8 +69,8 @@ public class DoubleJumpListener implements Listener {
public void handlePlayerMove(PlayerMoveEvent event) { public void handlePlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if(player.getLocation().add(0, -1, 0).getBlock().getType() == Material.AIR) if(player.getLocation().add(0, -1, 0).getBlock().getType() == Material.AIR) return;
return; if (LobbyPlayer.getLobbyPlayer(player).isFly()) return;
player.setAllowFlight(true); player.setAllowFlight(true);
if (player.getGameMode() == GameMode.ADVENTURE || player.getGameMode() == GameMode.SURVIVAL) { if (player.getGameMode() == GameMode.ADVENTURE || player.getGameMode() == GameMode.SURVIVAL) {