SteamWar/BauSystem2.0
Archiviert
12
0

ScriptEvents #45

Zusammengeführt
YoyoNow hat 11 Commits von ScriptEvents nach master 2021-09-22 08:02:40 +02:00 zusammengeführt
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
Nur Änderungen aus Commit ba04619bf4 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -51,7 +51,7 @@ public class CustomScript {
} }
@RequiredArgsConstructor @RequiredArgsConstructor
public class InventoryEvent implements CustomEvent { public static class InventoryEvent implements CustomEvent {
public final BookMeta bookMeta; public final BookMeta bookMeta;
public final String eventName; public final String eventName;
@ -68,7 +68,7 @@ public class CustomScript {
} }
@RequiredArgsConstructor @RequiredArgsConstructor
public class MenuEvent implements CustomEvent, MenuScript { public static class MenuEvent implements CustomEvent, MenuScript {
public final List<String> pages; public final List<String> pages;
public final String eventName; public final String eventName;
@ -159,7 +159,7 @@ public class CustomScript {
} }
@RequiredArgsConstructor @RequiredArgsConstructor
public class InventoryCommand implements CustomCommand { public static class InventoryCommand implements CustomCommand {
public final BookMeta bookMeta; public final BookMeta bookMeta;
public final String[] args; public final String[] args;
@ -176,7 +176,7 @@ public class CustomScript {
} }
@RequiredArgsConstructor @RequiredArgsConstructor
public class MenuCommand implements CustomCommand, MenuScript { public static class MenuCommand implements CustomCommand, MenuScript {
public final List<String> pages; public final List<String> pages;
public final String[] args; public final String[] args;

Datei anzeigen

@ -131,7 +131,7 @@ public class CustomScriptListener implements Listener {
YAPIONMap eventsMap = new YAPIONMap(); YAPIONMap eventsMap = new YAPIONMap();
yapionObject.add("events", eventsMap); yapionObject.add("events", eventsMap);
playerMap.get(p).stream().filter(CustomScript.MenuEvent.class::isInstance).map(CustomScript.MenuEvent.class::cast).forEach(menuCommand -> { playerMap.get(p).stream().filter(CustomScript.MenuEvent.class::isInstance).map(CustomScript.MenuEvent.class::cast).forEach(menuCommand -> {
menuCommand.toYAPION(commandsMap); menuCommand.toYAPION(eventsMap);
}); });
return yapionObject; return yapionObject;
} }