Add VersionedRunnable to ScriptListener
Dieser Commit ist enthalten in:
Ursprung
d45c39c528
Commit
1696aa4e54
@ -23,7 +23,7 @@ import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.commands.CommandScript;
|
||||
import de.steamwar.bausystem.commands.CommandTNT;
|
||||
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.VersionedCallable;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -72,13 +72,8 @@ public class ScriptListener implements Listener {
|
||||
}
|
||||
|
||||
private boolean isNoBook(ItemStack item){
|
||||
switch(Core.getVersion()){
|
||||
case 12:
|
||||
return ScriptListener_12.isNoBook(item);
|
||||
case 15:
|
||||
default:
|
||||
return ScriptListener_15.isNoBook(item);
|
||||
}
|
||||
return VersionedCallable.call(new VersionedCallable<>(() -> ScriptListener_12.isNoBook(item), 8),
|
||||
new VersionedCallable<>(() -> ScriptListener_15.isNoBook(item), 15));
|
||||
}
|
||||
|
||||
private static class ScriptExecutor {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren