From e667c6b394dd83ca9a5e388f00a3adb1d446a32b Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 1 Sep 2024 09:22:20 -0700 Subject: [PATCH] Fix merge --- .../bentobox/islandfly/listeners/FlyListener.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/world/bentobox/islandfly/listeners/FlyListener.java b/src/main/java/world/bentobox/islandfly/listeners/FlyListener.java index 87f4482..0ea3a2a 100644 --- a/src/main/java/world/bentobox/islandfly/listeners/FlyListener.java +++ b/src/main/java/world/bentobox/islandfly/listeners/FlyListener.java @@ -29,7 +29,7 @@ public class FlyListener implements Listener { /** * Addon instance object. */ - private final IslandFlyAddon islandFlyAddon; + private final IslandFlyAddon addon; /** @@ -61,7 +61,7 @@ public void onToggleFlight(final PlayerToggleFlightEvent event) { * @return true if fly was blocked */ private boolean checkUser(User user) { - String permPrefix = islandFlyAddon.getPlugin().getIWM().getPermissionPrefix(user.getWorld()); + String permPrefix = addon.getPlugin().getIWM().getPermissionPrefix(user.getWorld()); // Ignore ops if (user.isOp() || user.getPlayer().getGameMode().equals(GameMode.CREATIVE) || user.getPlayer().getGameMode().equals(GameMode.SPECTATOR) @@ -78,7 +78,7 @@ public void onEnterIsland(final IslandEnterEvent event) { user.getPlayer().setFlying(mdv.asBoolean()); }); // Wait until after arriving at the island - Bukkit.getScheduler().runTask(this.islandFlyAddon.getPlugin(), () -> checkUser(user)); + Bukkit.getScheduler().runTask(this.addon.getPlugin(), () -> checkUser(user)); } /** @@ -88,7 +88,7 @@ public void onEnterIsland(final IslandEnterEvent event) { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onExitIsland(final IslandExitEvent event) { final User user = User.getInstance(event.getPlayerUUID()); - String permPrefix = islandFlyAddon.getPlugin().getIWM().getPermissionPrefix(user.getWorld()); + String permPrefix = addon.getPlugin().getIWM().getPermissionPrefix(user.getWorld()); // Ignore ops if (user.isOp() || user.getPlayer().getGameMode().equals(GameMode.CREATIVE) || user.getPlayer().getGameMode().equals(GameMode.SPECTATOR) @@ -96,7 +96,7 @@ public void onExitIsland(final IslandExitEvent event) { || (!user.hasPermission(permPrefix + "island.fly") && !user.hasPermission(permPrefix + "island.flyspawn"))) return; // Alert player fly will be disabled - final int flyTimeout = this.islandFlyAddon.getSettings().getFlyTimeout(); + final int flyTimeout = this.addon.getSettings().getFlyTimeout(); // If timeout is 0 or less disable fly immediately if (flyTimeout <= 0) {