Different check for spigot compatibility

This commit is contained in:
libraryaddict 2020-06-24 17:33:43 +12:00
parent 0777947173
commit cd64d17a01
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -70,9 +70,11 @@ public class LibsDisguises extends JavaPlugin {
"reloads gracefully!"); "reloads gracefully!");
} }
if (Bukkit.getBukkitVersion().startsWith("git-Bukkit-")) { try {
DisguiseUtilities.getLogger() Class cl = Class.forName("org.bukkit.Server$Spigot");
.severe("Oh dear, you seem to be using CraftBukkit. Please use Spigot or Paper instead! This " + }
catch (ClassNotFoundException e) {
getLogger().severe("Oh dear, you seem to be using CraftBukkit. Please use Spigot or Paper instead! This " +
"plugin will continue to load, but it will look like a mugging victim"); "plugin will continue to load, but it will look like a mugging victim");
} }