This commit is contained in:
sgdc3
2018-02-04 15:12:23 +01:00
parent 74c06346d8
commit 6a5f335e16
2 changed files with 25 additions and 0 deletions
@@ -22,6 +22,20 @@ public final class Utils {
private Utils() {
}
/**
* Returns if the running server instance is craftbukkit or spigot based.
*
* @return true if the running server instance is spigot-based.
*/
public static boolean isSpigot() {
try {
Class.forName("org.spigotmc.SpigotConfig");
} catch (ClassNotFoundException e) {
return false;
}
return true;
}
/**
* Compile Pattern sneaky without throwing Exception.
*