Fly-Command #18
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -44,7 +44,7 @@ public class LobbyPlayer {
|
||||
cache.put(uuid, this);
|
||||
}
|
||||
|
||||
public boolean hasFly() {
|
||||
public boolean isFlying() {
|
||||
return fly;
|
||||
}
|
||||
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
isFly klingt so ein bisschen falsch, nenne es mal eher isFlying
vllt lieber hasFly() weil isFlying klingt auch nicht so gut?
if (LobbyPlayer.getLobbyPlayer(player).hasFly()) verwirrt auch erstmal. Deshalb isFlying.
hab ich