From 8d1297dec5538e66644cf833e4aad87249497f08 Mon Sep 17 00:00:00 2001 From: jojo Date: Wed, 30 Dec 2020 16:00:49 +0100 Subject: [PATCH] Rename LobbyPlayer.hasFly() -> isFlying() --- src/de/steamwar/lobby/commands/FlyCommand.java | 2 +- src/de/steamwar/lobby/listener/DoubleJumpListener.java | 4 ++-- src/de/steamwar/lobby/utils/LobbyPlayer.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/lobby/commands/FlyCommand.java b/src/de/steamwar/lobby/commands/FlyCommand.java index cbb829e..4d1fb69 100644 --- a/src/de/steamwar/lobby/commands/FlyCommand.java +++ b/src/de/steamwar/lobby/commands/FlyCommand.java @@ -43,7 +43,7 @@ public class FlyCommand implements CommandExecutor { } LobbyPlayer lobbyPlayer = LobbyPlayer.getLobbyPlayer(player); - boolean newFlightState = !lobbyPlayer.hasFly(); + boolean newFlightState = !lobbyPlayer.isFlying(); lobbyPlayer.setFly(newFlightState); player.setAllowFlight(newFlightState); diff --git a/src/de/steamwar/lobby/listener/DoubleJumpListener.java b/src/de/steamwar/lobby/listener/DoubleJumpListener.java index c8902ff..612b5e9 100644 --- a/src/de/steamwar/lobby/listener/DoubleJumpListener.java +++ b/src/de/steamwar/lobby/listener/DoubleJumpListener.java @@ -48,7 +48,7 @@ public class DoubleJumpListener implements Listener { if (player.getGameMode() != GameMode.ADVENTURE && player.getGameMode() != GameMode.SURVIVAL) { return; } - if (LobbyPlayer.getLobbyPlayer(player).hasFly()) { + if (LobbyPlayer.getLobbyPlayer(player).isFlying()) { return; } @@ -70,7 +70,7 @@ public class DoubleJumpListener implements Listener { Player player = event.getPlayer(); if(player.getLocation().add(0, -1, 0).getBlock().getType() == Material.AIR) return; - if (LobbyPlayer.getLobbyPlayer(player).hasFly()) return; + if (LobbyPlayer.getLobbyPlayer(player).isFlying()) return; player.setAllowFlight(true); if (player.getGameMode() == GameMode.ADVENTURE || player.getGameMode() == GameMode.SURVIVAL) { diff --git a/src/de/steamwar/lobby/utils/LobbyPlayer.java b/src/de/steamwar/lobby/utils/LobbyPlayer.java index 1c797e5..70f7b48 100644 --- a/src/de/steamwar/lobby/utils/LobbyPlayer.java +++ b/src/de/steamwar/lobby/utils/LobbyPlayer.java @@ -44,7 +44,7 @@ public class LobbyPlayer { cache.put(uuid, this); } - public boolean hasFly() { + public boolean isFlying() { return fly; }