diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2014-02-08 01:56:15 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-02-08 03:11:46 -0600 |
commit | 0c3527bfd2a0edfe84da50f9e5f26751ef1378bc (patch) | |
tree | aa0413c18818467cd5b94a57b6361c7f96a78725 /src/main/java/org | |
parent | f2328f933ed1f01dccf49dd23701a7d537c8f0bc (diff) | |
download | bukkit-0c3527bfd2a0edfe84da50f9e5f26751ef1378bc.tar bukkit-0c3527bfd2a0edfe84da50f9e5f26751ef1378bc.tar.gz bukkit-0c3527bfd2a0edfe84da50f9e5f26751ef1378bc.tar.lz bukkit-0c3527bfd2a0edfe84da50f9e5f26751ef1378bc.tar.xz bukkit-0c3527bfd2a0edfe84da50f9e5f26751ef1378bc.zip |
[Bleeding] Blacklist ":" in command names.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/command/PluginCommandYamlParser.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/PluginCommandYamlParser.java b/src/main/java/org/bukkit/command/PluginCommandYamlParser.java index 2e6fedf1..67875bcf 100644 --- a/src/main/java/org/bukkit/command/PluginCommandYamlParser.java +++ b/src/main/java/org/bukkit/command/PluginCommandYamlParser.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; public class PluginCommandYamlParser { @@ -19,6 +20,10 @@ public class PluginCommandYamlParser { } for (Entry<String, Map<String, Object>> entry : map.entrySet()) { + if (entry.getKey().contains(":")) { + Bukkit.getServer().getLogger().severe("Could not load command " + entry.getKey() + " for plugin " + plugin.getName() + ": Illegal Characters"); + continue; + } Command newCmd = new PluginCommand(entry.getKey(), plugin); Object description = entry.getValue().get("description"); Object usage = entry.getValue().get("usage"); |