From 7e1eb29dd22be0f4411ecd36f26c2daf1f38843a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 17 Apr 2020 14:30:29 +1200 Subject: [PATCH] Updated messages and commands for api version --- .../libraryaddict/disguise/LibsDisguises.java | 48 ++++++++++--------- .../disguise/utilities/LibsPremium.java | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java index 4191d120..1184c961 100644 --- a/src/main/java/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/main/java/me/libraryaddict/disguise/LibsDisguises.java @@ -113,32 +113,34 @@ public class LibsDisguises extends JavaPlugin { registerCommand("libsdisguises", new LibsDisguisesCommand()); - if (!DisguiseConfig.isDisableCommands() && !LibsPremium.isAPIPlugin()) { - registerCommand("disguise", new DisguiseCommand()); - registerCommand("undisguise", new UndisguiseCommand()); - registerCommand("disguiseplayer", new DisguisePlayerCommand()); - registerCommand("undisguiseplayer", new UndisguisePlayerCommand()); - registerCommand("undisguiseentity", new UndisguiseEntityCommand()); - registerCommand("disguiseentity", new DisguiseEntityCommand()); - registerCommand("disguiseradius", new DisguiseRadiusCommand(getConfig().getInt("DisguiseRadiusMax"))); - registerCommand("undisguiseradius", new UndisguiseRadiusCommand(getConfig().getInt("UndisguiseRadiusMax"))); - registerCommand("disguisehelp", new DisguiseHelpCommand()); - registerCommand("disguiseclone", new DisguiseCloneCommand()); - registerCommand("disguiseviewself", new DisguiseViewSelfCommand()); - registerCommand("disguisemodify", new DisguiseModifyCommand()); - registerCommand("disguisemodifyentity", new DisguiseModifyEntityCommand()); - registerCommand("disguisemodifyplayer", new DisguiseModifyPlayerCommand()); - registerCommand("disguisemodifyradius", - new DisguiseModifyRadiusCommand(getConfig().getInt("DisguiseRadiusMax"))); - registerCommand("copydisguise", new CopyDisguiseCommand()); + if (!DisguiseConfig.isDisableCommands()) { + if (!LibsPremium.isAPIPlugin()) { + registerCommand("disguise", new DisguiseCommand()); + registerCommand("undisguise", new UndisguiseCommand()); + registerCommand("disguiseplayer", new DisguisePlayerCommand()); + registerCommand("undisguiseplayer", new UndisguisePlayerCommand()); + registerCommand("undisguiseentity", new UndisguiseEntityCommand()); + registerCommand("disguiseentity", new DisguiseEntityCommand()); + registerCommand("disguiseradius", new DisguiseRadiusCommand(getConfig().getInt("DisguiseRadiusMax"))); + registerCommand("undisguiseradius", + new UndisguiseRadiusCommand(getConfig().getInt("UndisguiseRadiusMax"))); + registerCommand("disguisehelp", new DisguiseHelpCommand()); + registerCommand("disguiseclone", new DisguiseCloneCommand()); + registerCommand("disguiseviewself", new DisguiseViewSelfCommand()); + registerCommand("disguisemodify", new DisguiseModifyCommand()); + registerCommand("disguisemodifyentity", new DisguiseModifyEntityCommand()); + registerCommand("disguisemodifyplayer", new DisguiseModifyPlayerCommand()); + registerCommand("disguisemodifyradius", + new DisguiseModifyRadiusCommand(getConfig().getInt("DisguiseRadiusMax"))); + registerCommand("copydisguise", new CopyDisguiseCommand()); + } else { + getLogger().info("This is the API version! /grabskin and /savedisguise enabled!"); + } + registerCommand("grabskin", new GrabSkinCommand()); registerCommand("savedisguise", new SaveDisguiseCommand()); } else { - if (LibsPremium.isAPIPlugin()) { - getLogger().info("Commands not enabled in API version of Lib's Disguises!"); - } else { - getLogger().info("Commands has been disabled, as per config"); - } + getLogger().info("Commands has been disabled, as per config"); } new MetricsInitalizer(); diff --git a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java index 97a2f0ea..53396244 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java @@ -356,7 +356,7 @@ public class LibsPremium { FileUtil.copy(f, new File(LibsDisguises.getInstance().getDataFolder(), f.getName())); DisguiseUtilities.getLogger().info("Copied " + f.getName() + - " to the plugin folder! This is incase you want to use dev builds."); + " to the plugin folder! You can use dev builds with premium enabled!"); } }