aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/arikia/dev/drpc/OSUtil.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-06 13:01:03 +0900
committersyeyoung <cyong06@naver.com>2021-03-06 13:01:03 +0900
commitccdcb508b1b7b5fcc212efc39466434631118e87 (patch)
treef09e4fb0db49a10a1f91757c0432a908e6f89a6d /src/main/java/net/arikia/dev/drpc/OSUtil.java
parentd07cfe08841302ad1ce1e29902d06c4c439a589f (diff)
downloadSkyblock-Dungeons-Guide-ccdcb508b1b7b5fcc212efc39466434631118e87.tar.gz
Skyblock-Dungeons-Guide-ccdcb508b1b7b5fcc212efc39466434631118e87.tar.bz2
Skyblock-Dungeons-Guide-ccdcb508b1b7b5fcc212efc39466434631118e87.zip
UHH why would you troll
Diffstat (limited to 'src/main/java/net/arikia/dev/drpc/OSUtil.java')
-rw-r--r--src/main/java/net/arikia/dev/drpc/OSUtil.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/net/arikia/dev/drpc/OSUtil.java b/src/main/java/net/arikia/dev/drpc/OSUtil.java
new file mode 100644
index 00000000..74ca35c6
--- /dev/null
+++ b/src/main/java/net/arikia/dev/drpc/OSUtil.java
@@ -0,0 +1,25 @@
+package net.arikia.dev.drpc;
+
+/**
+ * @author DeJay
+ * @version 1.6.1
+ * <p>
+ * Class containing utils for detecting the user's OS.
+ */
+public final class OSUtil {
+
+ public boolean isMac() {
+ return getOS().toLowerCase()
+ .startsWith("mac");
+ }
+
+ public boolean isWindows() {
+ return getOS().toLowerCase()
+ .startsWith("win");
+ }
+
+ public String getOS() {
+ return System.getProperty("os.name").toLowerCase();
+ }
+
+} \ No newline at end of file