From e1400b7edfdf9e8e868dad6aa5623ff74631b234 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 3 Feb 2021 06:41:14 +1300 Subject: [PATCH] Fix warning #547 appearing for no good reason --- .../disguise/utilities/config/DisguiseCommandConfig.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/config/DisguiseCommandConfig.java b/src/main/java/me/libraryaddict/disguise/utilities/config/DisguiseCommandConfig.java index 7bc88091..8f25462e 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/config/DisguiseCommandConfig.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/config/DisguiseCommandConfig.java @@ -41,8 +41,12 @@ public class DisguiseCommandConfig { for (String name : config.getKeys(false)) { DisguiseCommand command = commands.get(name); + if (!config.isConfigurationSection(name)) { + continue; + } + if (command == null) { - DisguiseUtilities.getLogger().warning("Unable to find a command '" + name + "'"); + DisguiseUtilities.getLogger().warning("Config defines '" + name + "' as a command but that command doesn't exist?"); continue; }