diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 1af791cd..80a51d1f 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -232,13 +232,13 @@ SCRIPT_GUI_ITEM_NAME = §eScript Hilfe ## CustomScript SCRIPT_HOTKEY_ITEM_NAME = §7Hotkey§8: §e{0} SCRIPT_EVENT_ITEM_NAME = §7Event§8: §e{0} -SCRIPT_COMMAND_ITEM_NAME = §7Command§8: §e/{0} +SCRIPT_COMMAND_ITEM_NAME = §7Befehl§8: §e/{0} ## Script Menu GUI SCRIPT_MENU_GUI_ITEM_LORE_1 = §7Klicke zum rausnehmen -SCRIPT_MENU_GUI_ITEM_LORE_2 = §7Shift Klicke zum kopieren -SCRIPT_MENU_GUI_ITEM_LORE_3 = §7Rechts Klicke zum editieren -SCRIPT_MENU_GUI_ITEM_LORE_4 = §7Mittel Klicke zum anschauen +SCRIPT_MENU_GUI_ITEM_LORE_2 = §7Shiftklick zum kopieren +SCRIPT_MENU_GUI_ITEM_LORE_3 = §7Rechtsklick zum editieren +SCRIPT_MENU_GUI_ITEM_LORE_4 = §7Mittelklick zum anschauen SCRIPT_MENU_GUI_NAME = §eScript-Menü SCRIPT_MENU_GUI_ITEM_ADD_NAME = §eHinzufügen SCRIPT_MENU_GUI_ITEM_ADD_LORE = §7Klicke mit einem Buch zum hinzufügen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java index d3532dcd..6b8da019 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java @@ -90,7 +90,7 @@ public class ScriptRunner { public static boolean callEvent(Player player, SteamWarGlobalLuaPlugin.EventType event, LuaValue eventValue) { List luaFunctions = EVENT_MAP.getOrDefault(player, Collections.emptyMap()).getOrDefault(event, Collections.emptyList()); if (luaFunctions == null) { - if(event == SteamWarGlobalLuaPlugin.EventType.FF) { + if(event == SteamWarGlobalLuaPlugin.EventType.DoubleSwap) { player.performCommand("gui"); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java index 695543bd..32bf4a3f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java @@ -72,7 +72,7 @@ public class EventListener implements Listener { @EventHandler public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) { if (LAST_FS.containsKey(event.getPlayer())) { - event.setCancelled(ScriptRunner.callEvent(event.getPlayer(), SteamWarGlobalLuaPlugin.EventType.FF, LuaValue.NIL)); + event.setCancelled(ScriptRunner.callEvent(event.getPlayer(), SteamWarGlobalLuaPlugin.EventType.DoubleSwap, LuaValue.NIL)); } else { LAST_FS.put(event.getPlayer(), System.currentTimeMillis()); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java index 59326fb4..0bec9864 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java @@ -89,7 +89,7 @@ public class SteamWarGlobalLuaPlugin extends TwoArgFunction { } public enum EventType { - FF, + DoubleSwap, PlaceBlock, BreakBlock, RightClick, diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java index 679fb6f6..f1833bdd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java @@ -73,7 +73,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction { return LuaValue.NIL; } }); - env.set("timeout", new TwoArgFunction() { + env.set("delayed", new TwoArgFunction() { @Override public LuaValue call(LuaValue arg1, LuaValue arg2) { long time = arg1.checklong(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java index e4f2f12b..7a88cdc3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java @@ -38,7 +38,7 @@ public class PlayerLib implements LuaLib { public LuaTable get(Player player) { LuaTable table = new LuaTable(); table.set("name", getter(player::getName)); - table.set("message", new Print(player)); + table.set("chat", new Print(player)); table.set("actionbar", new SendActionbar(player)); table.set("x", getterAndSetter(player.getLocation()::getX, player.getLocation()::setX)); diff --git a/BauSystem_Main/src/de/steamwar/sql/Script.java b/BauSystem_Main/src/de/steamwar/sql/Script.java deleted file mode 100644 index 0a613341..00000000 --- a/BauSystem_Main/src/de/steamwar/sql/Script.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2023 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.sql; - -import de.steamwar.sql.internal.Field; -import de.steamwar.sql.internal.SelectStatement; -import de.steamwar.sql.internal.Statement; -import de.steamwar.sql.internal.Table; -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.List; - -@AllArgsConstructor -@Getter -public class Script { - // TODO: 28.05.23 REMOVE THIS - - private static final Table