Archiviert
13
0

Rename LobbyPlayer.hasFly() -> isFlying()

Dieser Commit ist enthalten in:
jojo 2020-12-30 16:00:49 +01:00
Ursprung e493f3cfe6
Commit 8d1297dec5
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -43,7 +43,7 @@ public class FlyCommand implements CommandExecutor {
} }
LobbyPlayer lobbyPlayer = LobbyPlayer.getLobbyPlayer(player); LobbyPlayer lobbyPlayer = LobbyPlayer.getLobbyPlayer(player);
boolean newFlightState = !lobbyPlayer.hasFly(); boolean newFlightState = !lobbyPlayer.isFlying();
lobbyPlayer.setFly(newFlightState); lobbyPlayer.setFly(newFlightState);
player.setAllowFlight(newFlightState); player.setAllowFlight(newFlightState);

Datei anzeigen

@ -48,7 +48,7 @@ public class DoubleJumpListener implements Listener {
if (player.getGameMode() != GameMode.ADVENTURE && player.getGameMode() != GameMode.SURVIVAL) { if (player.getGameMode() != GameMode.ADVENTURE && player.getGameMode() != GameMode.SURVIVAL) {
return; return;
} }
if (LobbyPlayer.getLobbyPlayer(player).hasFly()) { if (LobbyPlayer.getLobbyPlayer(player).isFlying()) {
return; return;
} }
@ -70,7 +70,7 @@ public class DoubleJumpListener implements Listener {
Player player = event.getPlayer(); Player player = event.getPlayer();
if(player.getLocation().add(0, -1, 0).getBlock().getType() == Material.AIR) return; 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); player.setAllowFlight(true);
if (player.getGameMode() == GameMode.ADVENTURE || player.getGameMode() == GameMode.SURVIVAL) { if (player.getGameMode() == GameMode.ADVENTURE || player.getGameMode() == GameMode.SURVIVAL) {

Datei anzeigen

@ -44,7 +44,7 @@ public class LobbyPlayer {
cache.put(uuid, this); cache.put(uuid, this);
} }
public boolean hasFly() { public boolean isFlying() {
return fly; return fly;
} }