#1531 Move spigot detection to BukkitService (#1534)

This commit is contained in:
ljacqu
2018-03-19 23:08:48 +01:00
committed by HexelDev
parent 250bd0d148
commit a1a909c01d
4 changed files with 43 additions and 29 deletions
@@ -1,7 +1,6 @@
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;
@@ -23,20 +22,6 @@ 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 {
Bukkit.spigot();
return true;
} catch (NoSuchMethodError e) {
return false;
}
}
/**
* Compile Pattern sneaky without throwing Exception.
*