- 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
22 lines
479 B
Java
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;
|
|
}
|
|
}
|