Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Ursprung
02c095a946
Commit
00dcfe3a49
@ -25,6 +25,7 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
|||||||
import com.sk89q.worldedit.event.platform.CommandEvent;
|
import com.sk89q.worldedit.event.platform.CommandEvent;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import de.steamwar.bausystem.BauSystem;
|
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.script.lua.libs.LuaLib;
|
||||||
import de.steamwar.bausystem.features.world.WorldEditListener;
|
import de.steamwar.bausystem.features.world.WorldEditListener;
|
||||||
import de.steamwar.bausystem.utils.WorldEditUtils;
|
import de.steamwar.bausystem.utils.WorldEditUtils;
|
||||||
@ -79,7 +80,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction {
|
|||||||
LuaFunction callback = arg2.checkfunction();
|
LuaFunction callback = arg2.checkfunction();
|
||||||
|
|
||||||
SWAnvilInv inv = new SWAnvilInv(player, message);
|
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();
|
inv.open();
|
||||||
|
|
||||||
return LuaValue.NIL;
|
return LuaValue.NIL;
|
||||||
@ -91,7 +92,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction {
|
|||||||
long time = arg1.checklong();
|
long time = arg1.checklong();
|
||||||
LuaFunction callback = arg2.checkfunction();
|
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;
|
return LuaValue.NIL;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren