Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Ursprung
d606c01bdf
Commit
5f0ac969d5
@ -233,6 +233,7 @@ GUI_EDITOR_TITLE_MORE=Select item
|
|||||||
SCRIPT_ERROR_GUI=§cError in parsing script: Line {0}
|
SCRIPT_ERROR_GUI=§cError in parsing script: Line {0}
|
||||||
SCRIPT_ERROR_GLOBAL=§cError in global script: Line {0}
|
SCRIPT_ERROR_GLOBAL=§cError in global script: Line {0}
|
||||||
SCRIPT_ERROR_CLICK=§cError in script: Line {0}
|
SCRIPT_ERROR_CLICK=§cError in script: Line {0}
|
||||||
|
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cThis function is only available in global scripts
|
||||||
|
|
||||||
## CustomScript
|
## CustomScript
|
||||||
SCRIPT_HOTKEY_ITEM_NAME = §7Hotkey§8: §e{0}
|
SCRIPT_HOTKEY_ITEM_NAME = §7Hotkey§8: §e{0}
|
||||||
|
@ -230,6 +230,7 @@ GUI_EDITOR_TITLE_MORE=Item auswählen
|
|||||||
SCRIPT_HOTKEY_ITEM_NAME = §7Hotkey§8: §e{0}
|
SCRIPT_HOTKEY_ITEM_NAME = §7Hotkey§8: §e{0}
|
||||||
SCRIPT_EVENT_ITEM_NAME = §7Event§8: §e{0}
|
SCRIPT_EVENT_ITEM_NAME = §7Event§8: §e{0}
|
||||||
SCRIPT_COMMAND_ITEM_NAME = §7Befehl§8: §e/{0}
|
SCRIPT_COMMAND_ITEM_NAME = §7Befehl§8: §e/{0}
|
||||||
|
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cDieses Skript kann nur als globales Skript ausgeführt werden
|
||||||
|
|
||||||
## Script Menu GUI
|
## Script Menu GUI
|
||||||
SCRIPT_MENU_GUI_ITEM_LORE_1 = §7Klicke zum rausnehmen
|
SCRIPT_MENU_GUI_ITEM_LORE_1 = §7Klicke zum rausnehmen
|
||||||
|
@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.script.lua;
|
package de.steamwar.bausystem.features.script.lua;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.luaj.vm2.Globals;
|
import org.luaj.vm2.Globals;
|
||||||
import org.luaj.vm2.LoadState;
|
import org.luaj.vm2.LoadState;
|
||||||
|
import org.luaj.vm2.LuaError;
|
||||||
import org.luaj.vm2.LuaFunction;
|
import org.luaj.vm2.LuaFunction;
|
||||||
import org.luaj.vm2.compiler.LuaC;
|
import org.luaj.vm2.compiler.LuaC;
|
||||||
import org.luaj.vm2.lib.Bit32Lib;
|
import org.luaj.vm2.lib.Bit32Lib;
|
||||||
@ -46,6 +48,14 @@ public class SteamWarPlatform {
|
|||||||
globals.load(new StringLib());
|
globals.load(new StringLib());
|
||||||
globals.load(new SteamWarLuaPlugin(player));
|
globals.load(new SteamWarLuaPlugin(player));
|
||||||
|
|
||||||
|
globals.load(new SteamWarGlobalLuaPlugin((eventType, luaFunction) -> {
|
||||||
|
throw new LuaError(BauSystem.MESSAGE.parse("SCRIPT_ERROR_ONLY_IN_GLOBAL", player));
|
||||||
|
}, (s, luaFunction) -> {
|
||||||
|
throw new LuaError(BauSystem.MESSAGE.parse("SCRIPT_ERROR_ONLY_IN_GLOBAL", player));
|
||||||
|
}, commandRegister -> {
|
||||||
|
throw new LuaError(BauSystem.MESSAGE.parse("SCRIPT_ERROR_ONLY_IN_GLOBAL", player));
|
||||||
|
}));
|
||||||
|
|
||||||
LoadState.install(globals);
|
LoadState.install(globals);
|
||||||
LuaC.install(globals);
|
LuaC.install(globals);
|
||||||
return globals;
|
return globals;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren