From ba04619bf41d543067303896bf2c582fde54792e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 20 Sep 2021 22:11:18 +0200 Subject: [PATCH] Fix migration problems Signed-off-by: yoyosource --- .../steamwar/bausystem/features/script/CustomScript.java | 8 ++++---- .../bausystem/features/script/CustomScriptListener.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScript.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScript.java index f67c89e1..94bc2f75 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScript.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScript.java @@ -51,7 +51,7 @@ public class CustomScript { } @RequiredArgsConstructor - public class InventoryEvent implements CustomEvent { + public static class InventoryEvent implements CustomEvent { public final BookMeta bookMeta; public final String eventName; @@ -68,7 +68,7 @@ public class CustomScript { } @RequiredArgsConstructor - public class MenuEvent implements CustomEvent, MenuScript { + public static class MenuEvent implements CustomEvent, MenuScript { public final List pages; public final String eventName; @@ -159,7 +159,7 @@ public class CustomScript { } @RequiredArgsConstructor - public class InventoryCommand implements CustomCommand { + public static class InventoryCommand implements CustomCommand { public final BookMeta bookMeta; public final String[] args; @@ -176,7 +176,7 @@ public class CustomScript { } @RequiredArgsConstructor - public class MenuCommand implements CustomCommand, MenuScript { + public static class MenuCommand implements CustomCommand, MenuScript { public final List pages; public final String[] args; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScriptListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScriptListener.java index 92221f21..d440ca70 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScriptListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/CustomScriptListener.java @@ -131,7 +131,7 @@ public class CustomScriptListener implements Listener { YAPIONMap eventsMap = new YAPIONMap(); yapionObject.add("events", eventsMap); playerMap.get(p).stream().filter(CustomScript.MenuEvent.class::isInstance).map(CustomScript.MenuEvent.class::cast).forEach(menuCommand -> { - menuCommand.toYAPION(commandsMap); + menuCommand.toYAPION(eventsMap); }); return yapionObject; }