mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
[Bleeding] Blacklist ":" in command names.
This commit is contained in:
parent
f2328f933e
commit
0c3527bfd2
1 changed files with 5 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue