From cd64d17a017831157ecf23446e8de6924ddc06c7 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 24 Jun 2020 17:33:43 +1200 Subject: [PATCH] Different check for spigot compatibility --- .../java/me/libraryaddict/disguise/LibsDisguises.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java index 0d79d63b..18a31759 100644 --- a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java @@ -70,10 +70,12 @@ public class LibsDisguises extends JavaPlugin { "reloads gracefully!"); } - if (Bukkit.getBukkitVersion().startsWith("git-Bukkit-")) { - DisguiseUtilities.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"); + try { + Class cl = Class.forName("org.bukkit.Server$Spigot"); + } + 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"); } if (!new File(getDataFolder(), "disguises.yml").exists()) {