diff --git a/src/main/java/nl/sbdeveloper/themeparkplus/commands/TPPCMD.java b/src/main/java/nl/sbdeveloper/themeparkplus/commands/TPPCMD.java index 83af0e4..8a2162a 100644 --- a/src/main/java/nl/sbdeveloper/themeparkplus/commands/TPPCMD.java +++ b/src/main/java/nl/sbdeveloper/themeparkplus/commands/TPPCMD.java @@ -203,7 +203,7 @@ public class TPPCMD implements CommandExecutor { return true; } - if (amount != 0) { + if (amount == 0) { if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Gates.Opened")); } else { if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Gates.OpenedAmount", Collections.singletonMap("%amount%", String.valueOf(amount)))); diff --git a/src/main/java/nl/sbdeveloper/themeparkplus/listeners/AntiFreerunListener.java b/src/main/java/nl/sbdeveloper/themeparkplus/listeners/AntiFreerunListener.java index 2dbf181..0c55dff 100644 --- a/src/main/java/nl/sbdeveloper/themeparkplus/listeners/AntiFreerunListener.java +++ b/src/main/java/nl/sbdeveloper/themeparkplus/listeners/AntiFreerunListener.java @@ -6,10 +6,11 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; +import org.jetbrains.annotations.NotNull; public class AntiFreerunListener implements Listener { @EventHandler - public void onJoin(PlayerJoinEvent e) { + public void onJoin(@NotNull PlayerJoinEvent e) { Player p = e.getPlayer(); if (!p.hasPermission("tpp.bypassantifreerun")) { p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000000, -2, false, false));