aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-06-29 22:41:42 +0100
committerLuck <git@lucko.me>2022-06-29 22:41:42 +0100
commit2b24d42ab2b9a9c28a5929520d9ca565f07724f9 (patch)
tree9b8e4dec339ff3836a6fe4db74458af3026c338b /spark-common/src/main
parentf2c2a75bfa73080c9837471c92f96f57c9620c45 (diff)
downloadspark-2b24d42ab2b9a9c28a5929520d9ca565f07724f9.tar.gz
spark-2b24d42ab2b9a9c28a5929520d9ca565f07724f9.tar.bz2
spark-2b24d42ab2b9a9c28a5929520d9ca565f07724f9.zip
Add server config providers for Fabric/Forge
Diffstat (limited to 'spark-common/src/main')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java b/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java
index 501851a..559ae95 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java
@@ -23,7 +23,10 @@ package me.lucko.spark.common.platform.serverconfig;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonElement;
+import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
/**
@@ -60,4 +63,11 @@ public abstract class AbstractServerConfigProvider implements ServerConfigProvid
return builder.build();
}
+ protected static List<String> getSystemPropertyList(String property) {
+ String value = System.getProperty(property);
+ return value == null
+ ? Collections.emptyList()
+ : Arrays.asList(value.split(","));
+ }
+
}