13
0
geforkt von Mirrors/Paper

[Bleeding] Blacklist ":" in command names.

By: t00thpick1 <t00thpick1dirko@gmail.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2014-02-08 01:56:15 -05:00
Ursprung e833c88a72
Commit 0057d2f32f

Datei anzeigen

@ -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");