From 18745447210804b3ec8cc613390e68e9fc85ae0e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 3 Feb 2020 20:32:21 +1300 Subject: [PATCH] Stuff --- .../java/me/libraryaddict/disguise/DisguiseListener.java | 7 ++++++- src/main/java/me/libraryaddict/disguise/LibsDisguises.java | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/DisguiseListener.java b/src/main/java/me/libraryaddict/disguise/DisguiseListener.java index 7793cd32..06d7a596 100644 --- a/src/main/java/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/main/java/me/libraryaddict/disguise/DisguiseListener.java @@ -14,13 +14,13 @@ import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; import me.libraryaddict.disguise.disguisetypes.TargetedDisguise; import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher; import me.libraryaddict.disguise.utilities.DisguiseUtilities; +import me.libraryaddict.disguise.utilities.LibsPremium; import me.libraryaddict.disguise.utilities.UpdateChecker; import me.libraryaddict.disguise.utilities.parser.DisguiseParseException; import me.libraryaddict.disguise.utilities.parser.DisguiseParser; import me.libraryaddict.disguise.utilities.parser.DisguisePerm; import me.libraryaddict.disguise.utilities.parser.DisguisePermissions; import me.libraryaddict.disguise.utilities.translations.LibsMsg; -import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; @@ -66,6 +66,11 @@ public class DisguiseListener implements Listener { runUpdateScheduler(); + if (!LibsPremium.getPluginInformation().isPremium() || + LibsPremium.getPluginInformation().getUserID().matches("[0-9]")) { + Bukkit.getPluginManager().registerEvents(this, plugin); + } + if (!DisguiseConfig.isSaveEntityDisguises()) return; diff --git a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java index cc3fe26e..ef1676ce 100644 --- a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java @@ -90,8 +90,6 @@ public class LibsDisguises extends JavaPlugin { listener = new DisguiseListener(this); - Bukkit.getPluginManager().registerEvents(listener, this); - if (!DisguiseConfig.isDisableCommands()) { registerCommand("disguise", new DisguiseCommand()); registerCommand("undisguise", new UndisguiseCommand());