diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java b/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java index 4ffb48a..6af24d7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java @@ -171,7 +171,7 @@ public class AutoLoader extends IAutoLoader implements Listener { detoloader = AutoLoader_12.onPlayerInteractLoader(event); } - if(detoloader == null) return; + if(detoloader == null || detoloader.getActivation() < 0) return; if(detoloader.useActive) new IAutoLoader.RedstoneActivation(this, event.getClickedBlock().getLocation() , detoloader.getActivation() == 0 ? getLastActivation() : detoloader.getActivation() diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java index 1ce5df1..8c54abe 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java @@ -76,7 +76,6 @@ public class Detonator implements Listener { } public void execute() { - player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§a" + locs.size() + " Punkt(e) ausgelöst!")); for (Detoloader.DetonatorActivation activation: getLocations()) { Boolean powered; @@ -100,6 +99,7 @@ public class Detonator implements Listener { AutoLoader_12.setRedstone(activation.location, false), activation.activation); } } + player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§a" + locs.size() + " Punkt" + (locs.size() > 1 ? "e" : "") + " ausgelöst!")); } @EventHandler @@ -157,7 +157,7 @@ public class Detonator implements Listener { } } - @EventHandler(ignoreCancelled = true) + @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { deleteDetonator(event.getPlayer()); }