Add VersionedRunnable to AutoLoader
Dieser Commit ist enthalten in:
Ursprung
de2f4a1c53
Commit
461e6d17a0
@ -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
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren