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 67875bcf17..5854583e1a 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java +++ b/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java @@ -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); diff --git a/paper-api/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/paper-api/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java index 9e6c1d941a..0d1e3a045a 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java +++ b/paper-api/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java @@ -537,7 +537,9 @@ public final class PluginDescriptionFile { *
+ * Note: Command aliases may not have a colon in them. *
or * multiple alias format: @@ -617,7 +619,7 @@ public final class PluginDescriptionFile { * # Having an empty declaration is useful for defining the description, permission, and messages from a configuration dynamically * apocalypse: * - * Note: command names may not have a colon in their name. + * Note: Command names may not have a colon in their name. * * @return the commands this plugin will register */aliases: combust_me