From 900bbb0aec88417a27dfaddf530f4628bf478f0e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 21 May 2023 14:55:46 +0200 Subject: [PATCH] Add default ff Signed-off-by: Chaoscaot --- .../bausystem/features/script/ScriptRunner.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 8c50d879..d3532dcd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java @@ -88,13 +88,12 @@ public class ScriptRunner { } public static boolean callEvent(Player player, SteamWarGlobalLuaPlugin.EventType event, LuaValue eventValue) { - Map> stringListMap = EVENT_MAP.get(player); - if (stringListMap == null) { - return false; - } - - List luaFunctions = stringListMap.get(event); + List luaFunctions = EVENT_MAP.getOrDefault(player, Collections.emptyMap()).getOrDefault(event, Collections.emptyList()); if (luaFunctions == null) { + if(event == SteamWarGlobalLuaPlugin.EventType.FF) { + player.performCommand("gui"); + } + return false; }