diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java b/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java index 6763ac7..1b83664 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/AutoLoader.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.world; import de.steamwar.bausystem.BauSystem; -import de.steamwar.core.Core; import de.steamwar.core.VersionedCallable; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -225,12 +224,8 @@ public class AutoLoader extends IAutoLoader implements Listener { @Override boolean setRedstone(Location location, boolean active){ - switch(Core.getVersion()){ - case 15: - return AutoLoader_15.setRedstone(location, active); - default: - return AutoLoader_12.setRedstone(location, active); - } + return VersionedCallable.call(new VersionedCallable<>(() -> AutoLoader_12.setRedstone(location, active), 8), + new VersionedCallable<>(() -> AutoLoader_15.setRedstone(location, active), 15)); } @Override @@ -256,12 +251,8 @@ public class AutoLoader extends IAutoLoader implements Listener { @Override public boolean perform() { - switch(Core.getVersion()){ - case 15: - return AutoLoader_15.tntPlaceActionPerform(location); - default: - return AutoLoader_12.tntPlaceActionPerform(location); - } + return VersionedCallable.call(new VersionedCallable<>(() -> AutoLoader_12.tntPlaceActionPerform(location), 8), + new VersionedCallable<>(() -> AutoLoader_15.tntPlaceActionPerform(location), 15)); } @Override