Refactor Module into a single record type and fix system globals (#1383)

This commit is contained in:
altrisi authored and GitHub committed 2022-05-17 20:11:49 +02:00
1 parent d681cb4c54
commit a60bc386cb
20 files changed
+279 -215

No files matched your search

@@ -42,7 +42,7 @@ public class SystemInfo {
String name = c.host.getName();
return name == null?Value.NULL:new StringValue(name);
});
put("app_list", c -> ListValue.wrap(((CarpetScriptHost)c.host).getScriptServer().modules.keySet().stream().filter(Objects::nonNull).map(StringValue::new).collect(Collectors.toList())));
put("app_list", c -> ListValue.wrap(((CarpetScriptHost)c.host).scriptServer().modules.keySet().stream().filter(Objects::nonNull).map(StringValue::new).collect(Collectors.toList())));
put("app_scope", c -> StringValue.of((c.host).isPerUser()?"player":"global"));
put("app_players", c -> ListValue.wrap(c.host.getUserList().stream().map(StringValue::new).collect(Collectors.toList())));