Import Parabot "API" & Rename Directory Names

This commit is contained in:
Dark98
2021-10-06 16:28:08 +01:00
parent ffc3bdd5a8
commit 82646880da
32 changed files with 2027 additions and 5 deletions
@@ -0,0 +1,26 @@
package org.parabot.api.misc;
/**
* This class is used for detecting the user's operating system
*
* @author Everel
*/
public enum OperatingSystem {
WINDOWS, LINUX, MAC, OTHER;
public static final OperatingSystem getOS() {
String str = System.getProperty("os.name").toLowerCase();
if (str.contains("win")) {
return OperatingSystem.WINDOWS;
}
if (str.contains("mac")) {
return OperatingSystem.MAC;
}
if (str.contains("nix") || str.contains("nux")) {
return OperatingSystem.LINUX;
}
return OperatingSystem.OTHER;
}
}