From 0057d2f32f2009df870ecd9666c8009d76259c95 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 8 Feb 2014 01:56:15 -0500 Subject: [PATCH] [Bleeding] Blacklist ":" in command names. By: t00thpick1 --- .../java/org/bukkit/command/PluginCommandYamlParser.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java b/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java index 2e6fedf1dc..67875bcf17 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java +++ b/paper-api/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> 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");