From e0e622d5f44420eae5b26bed6f7b2c0ce6f1d880 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 20 Dec 2021 07:48:25 +1300 Subject: [PATCH] Change how we fetch PL version, move the code inside the if {} --- .../main/java/me/libraryaddict/disguise/LibsDisguises.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/me/libraryaddict/disguise/LibsDisguises.java b/plugin/src/main/java/me/libraryaddict/disguise/LibsDisguises.java index 360b3867..772edea3 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/LibsDisguises.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/LibsDisguises.java @@ -176,10 +176,10 @@ public class LibsDisguises extends JavaPlugin { return; } - String requiredProtocolLib = StringUtils.join(DisguiseUtilities.getProtocolLibRequiredVersion(), " or build #"); - String version = ProtocolLibrary.getPlugin().getDescription().getVersion(); - if (DisguiseUtilities.isProtocolLibOutdated()) { + String requiredProtocolLib = StringUtils.join(DisguiseUtilities.getProtocolLibRequiredVersion(), " or build #"); + String version = Bukkit.getPluginManager().getPlugin("ProtocolLib").getDescription().getVersion(); + BukkitRunnable runnable = new BukkitRunnable() { private int timesRun;