SteamWar/BauSystem
Archiviert
13
0

Add VersionedRunnable to AutoLoader

Dieser Commit ist enthalten in:
jojo 2021-02-08 21:02:19 +01:00
Ursprung de2f4a1c53
Commit 461e6d17a0

Datei anzeigen

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