diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorDisable.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorDisable.java deleted file mode 100644 index 4c7e3e24..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorDisable.java +++ /dev/null @@ -1,16 +0,0 @@ -package de.steamwar.bausystem.features.simulator; - -import de.steamwar.bausystem.linkage.Disable; -import de.steamwar.bausystem.linkage.LinkageType; -import de.steamwar.bausystem.linkage.Linked; - -@Linked(LinkageType.DISABLE_LINK) -public class TNTSimulatorDisable implements Disable { - - @Override - public void disable() { - for (TNTSimulator simulator : TNTSimulator.TNT_SIMULATOR_MAP.values()) { - simulator.save(); - } - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java index f2743fb8..ba3b3763 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java @@ -23,6 +23,7 @@ package de.steamwar.bausystem.features.simulator; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.linkage.Disable; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import org.bukkit.FluidCollisionMode; @@ -47,7 +48,8 @@ import static de.steamwar.bausystem.features.simulator.TNTSimulator.WAND; import static de.steamwar.bausystem.features.simulator.TNTSimulator.get; @Linked(LinkageType.LISTENER) -public class TNTSimulatorListener implements Listener { +@Linked(LinkageType.DISABLE_LINK) +public class TNTSimulatorListener implements Listener, Disable { private boolean permissionCheck(Player player) { if (!Permission.hasPermission(player, Permission.WORLD)) { @@ -142,4 +144,11 @@ public class TNTSimulatorListener implements Listener { public void onPlayerQuit(PlayerQuitEvent event) { get(event.getPlayer()).saveAndDelete(); } + + @Override + public void disable() { + for (TNTSimulator simulator : TNTSimulator.TNT_SIMULATOR_MAP.values()) { + simulator.save(); + } + } }