mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
Change how we detect spigot #1531
This commit is contained in:
parent
aab5d71efd
commit
3a690fd79a
@ -1,6 +1,7 @@
|
||||
package fr.xephi.authme.util;
|
||||
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
@ -28,7 +29,12 @@ public final class Utils {
|
||||
* @return true if the running server instance is spigot-based.
|
||||
*/
|
||||
public static boolean isSpigot() {
|
||||
return isClassLoaded("org.spigotmc.SpigotConfig");
|
||||
try {
|
||||
Bukkit.spigot();
|
||||
return true;
|
||||
} catch (NoSuchMethodError e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user