From 5bb9eeac8463bfb03ee9b94c484bcafd792a02f0 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 10 Nov 2019 22:54:32 +1300 Subject: [PATCH] Change the method used to check for Paper --- .../disguise/utilities/DisguiseUtilities.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index e39b4e19..4b34ecf2 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -859,7 +859,12 @@ public class DisguiseUtilities { } public static void init(LibsDisguises disguises) { - runningPaper = Bukkit.getServer().getBukkitVersion().contains("Paper"); + try { + runningPaper = Class.forName("com.destroystokyo.paper.VersionHistoryManager$VersionData") != null; + } + catch (Exception ex) { + + } GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.registerTypeAdapter(MetaIndex.class, new SerializerMetaIndex());