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