diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-12-17 17:43:04 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-12-17 18:32:42 +0000 |
commit | bd4a48c441092b41b2d604cbd370f4da14279250 (patch) | |
tree | 86119ec10ffcd989cbcbb68faaf52e8a2db68f05 | |
parent | 00bd6a3e02e3ad8a7a3534f5e2323409bef9ede2 (diff) | |
download | Essentials-bd4a48c441092b41b2d604cbd370f4da14279250.tar Essentials-bd4a48c441092b41b2d604cbd370f4da14279250.tar.gz Essentials-bd4a48c441092b41b2d604cbd370f4da14279250.tar.lz Essentials-bd4a48c441092b41b2d604cbd370f4da14279250.tar.xz Essentials-bd4a48c441092b41b2d604cbd370f4da14279250.zip |
Fix command costs warnings.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Settings.java | 6 |
1 files changed, 5 insertions, 1 deletions
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)); |