SteamWar/BauSystem2.0
Archiviert
12
0

Fix catches
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Chaoscaot 2023-08-02 12:51:01 +02:00
Ursprung 02c095a946
Commit 00dcfe3a49
Signiert von: Chaoscaot
GPG-Schlüssel-ID: BDF8FADD7D5EDB7A

Datei anzeigen

@ -25,6 +25,7 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.event.platform.CommandEvent;
import com.sk89q.worldedit.extension.platform.Actor;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.features.script.ScriptRunner;
import de.steamwar.bausystem.features.script.lua.libs.LuaLib;
import de.steamwar.bausystem.features.world.WorldEditListener;
import de.steamwar.bausystem.utils.WorldEditUtils;
@ -79,7 +80,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction {
LuaFunction callback = arg2.checkfunction();
SWAnvilInv inv = new SWAnvilInv(player, message);
inv.setCallback(s -> callback.call(valueOf(s)));
inv.setCallback(s -> ScriptRunner.catchScript("SCRIPT_ERROR_CLICK", player, () -> callback.call(valueOf(s))));
inv.open();
return LuaValue.NIL;
@ -91,7 +92,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction {
long time = arg1.checklong();
LuaFunction callback = arg2.checkfunction();
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> callback.call(), time);
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> ScriptRunner.catchScript("SCRIPT_ERROR_CLICK", player, callback::call), time);
return LuaValue.NIL;
}
});