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 9b4f8493b2..2305e0ed7c 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java +++ b/paper-api/src/main/java/org/bukkit/command/PluginCommandYamlParser.java @@ -9,13 +9,13 @@ import org.bukkit.plugin.Plugin; public class PluginCommandYamlParser { + @SuppressWarnings("unchecked") public static List parse(Plugin plugin) { List pluginCmds = new ArrayList(); Object object = plugin.getDescription().getCommands(); if (object == null) return pluginCmds; - @SuppressWarnings("unchecked") Map> map = (Map>)object; if (map != null) { @@ -34,9 +34,13 @@ public class PluginCommandYamlParser { if (aliases != null) { List aliasList = new ArrayList(); - - for(String a : aliases.toString().split(",")) { - aliasList.add(a); + + if (aliases instanceof List) { + for (Object o : (List)aliases) { + aliasList.add(o.toString()); + } + } else { + aliasList.add(aliases.toString()); } newCmd.setAliases(aliasList);