aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/dev/isxander/yacl3/platform
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-08-12 23:56:06 +0100
committerisXander <xandersmith2008@gmail.com>2023-08-12 23:56:06 +0100
commitd37e147dbb4db44a921533b572aed3e54b5c6a42 (patch)
tree0c72e58da081135d3819c4af7365f08c2af7fdb6 /common/src/main/java/dev/isxander/yacl3/platform
parent3083aebe47f63661238ee2b521b0451af2d95e9f (diff)
downloadYetAnotherConfigLib-d37e147dbb4db44a921533b572aed3e54b5c6a42.tar.gz
YetAnotherConfigLib-d37e147dbb4db44a921533b572aed3e54b5c6a42.tar.bz2
YetAnotherConfigLib-d37e147dbb4db44a921533b572aed3e54b5c6a42.zip
Config API v2
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl3/platform')
-rw-r--r--common/src/main/java/dev/isxander/yacl3/platform/Env.java10
-rw-r--r--common/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java22
2 files changed, 32 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/platform/Env.java b/common/src/main/java/dev/isxander/yacl3/platform/Env.java
new file mode 100644
index 0000000..276d294
--- /dev/null
+++ b/common/src/main/java/dev/isxander/yacl3/platform/Env.java
@@ -0,0 +1,10 @@
+package dev.isxander.yacl3.platform;
+
+public enum Env {
+ CLIENT,
+ SERVER;
+
+ public boolean isClient() {
+ return this == Env.CLIENT;
+ }
+}
diff --git a/common/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java b/common/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java
new file mode 100644
index 0000000..590723e
--- /dev/null
+++ b/common/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java
@@ -0,0 +1,22 @@
+package dev.isxander.yacl3.platform;
+
+import dev.architectury.injectables.annotations.ExpectPlatform;
+
+import java.nio.file.Path;
+
+public final class YACLPlatform {
+ @ExpectPlatform
+ public static Env getEnvironment() {
+ throw new AssertionError();
+ }
+
+ @ExpectPlatform
+ public static Path getConfigDir() {
+ throw new AssertionError();
+ }
+
+ @ExpectPlatform
+ public static boolean isDevelopmentEnv() {
+ throw new AssertionError();
+ }
+}