diff options
author | Luck <git@lucko.me> | 2022-06-29 22:41:42 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-06-29 22:41:42 +0100 |
commit | 2b24d42ab2b9a9c28a5929520d9ca565f07724f9 (patch) | |
tree | 9b8e4dec339ff3836a6fe4db74458af3026c338b /spark-common/src/main | |
parent | f2c2a75bfa73080c9837471c92f96f57c9620c45 (diff) | |
download | spark-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.java | 10 |
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(",")); + } + } |