LoginSystem/src/main/java/fr/xephi/authme/util/ServerUtils.java
ljacqu 80337f758b #831 Cleanup, finalization
- Handle AsyncPlayerPreLoginEvent in main PlayerListener class: Spigot emits it in offline mode, whereas offline CraftBukkit doesn't
- Remove listener for sync PlayerPreLoginEvent; not fired by offline CraftBukkit either
- Add warning when offline CraftBukkit is detected and single session setting is enabled
2016-08-03 19:58:10 +02:00

22 lines
479 B
Java

package fr.xephi.authme.util;
public final class ServerUtils {
private 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;
}
}