Listeners name refactor + Fix #831 for both Spigot and CraftBukkit

This commit is contained in:
Gabriele C
2016-08-03 01:02:25 +02:00
parent bff99902b0
commit 75421fd156
16 changed files with 167 additions and 41 deletions
@@ -0,0 +1,18 @@
package tools.utils;
public class ServerUtils {
/**
* Check if the server implementation is based on Spigot
*
* @return true if the implementation is based on Spigot
*/
public static boolean isSpigot() {
try {
Class.forName("org.spigotmc.CustomTimingsHandler");
return true;
} catch (ClassNotFoundException ignored) {
}
return false;
}
}