From 4120d12380fd101e7fa490c1dc4c627051aee8e6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 17 Dec 2012 17:43:04 +0000 Subject: [PATCH] Fix command costs warnings. --- Essentials/src/com/earth2me/essentials/Settings.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 416602c4d..a8ef1a344 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -191,10 +191,14 @@ public class Settings implements ISettings for (String command : section.getKeys(false)) { PluginCommand cmd = ess.getServer().getPluginCommand(command); - if (cmd == null || !cmd.getPlugin().equals(ess)) + if (cmd != null && !cmd.getPlugin().equals(ess)) { ess.getLogger().warning("Invalid command cost. '" + command + "' is not a command handled by Essentials."); } + else if (command.charAt(0) == '/') + { + ess.getLogger().warning("Invalid command cost. '" + command + "' should not start with '/'."); + } if (section.isDouble(command)) { newSection.set(command.toLowerCase(Locale.ENGLISH), section.getDouble(command));