mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-12 10:45:50 -07:00
[Bleeding] Also blacklist ":" in plugin command aliases.
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
@@ -44,10 +44,18 @@ public class PluginCommandYamlParser {
|
||||
|
||||
if (aliases instanceof List) {
|
||||
for (Object o : (List<?>) aliases) {
|
||||
if (o.toString().contains(":")) {
|
||||
Bukkit.getServer().getLogger().severe("Could not load alias " + o.toString() + " for plugin " + plugin.getName() + ": Illegal Characters");
|
||||
continue;
|
||||
}
|
||||
aliasList.add(o.toString());
|
||||
}
|
||||
} else {
|
||||
aliasList.add(aliases.toString());
|
||||
if (aliases.toString().contains(":")) {
|
||||
Bukkit.getServer().getLogger().severe("Could not load alias " + aliases.toString() + " for plugin " + plugin.getName() + ": Illegal Characters");
|
||||
} else {
|
||||
aliasList.add(aliases.toString());
|
||||
}
|
||||
}
|
||||
|
||||
newCmd.setAliases(aliasList);
|
||||
|
Reference in New Issue
Block a user