mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-22 08:01:24 +01:00
Fixes a bug with Commands not being able to find subcommand if defined label contains capital letter. (#1724)
This commit is contained in:
parent
9220f9652b
commit
dc829786d3
@ -182,13 +182,13 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
this.parent = parent;
|
||||
subCommandLevel = parent.getLevel() + 1;
|
||||
// Add this sub-command to the parent
|
||||
parent.getSubCommands().put(label, this);
|
||||
parent.getSubCommands().put(label.toLowerCase(java.util.Locale.ENGLISH), this);
|
||||
setAliases(new ArrayList<>(Arrays.asList(aliases)));
|
||||
subCommands = new LinkedHashMap<>();
|
||||
subCommandAliases = new LinkedHashMap<>();
|
||||
// Add aliases to the parent for this command
|
||||
for (String alias : aliases) {
|
||||
parent.getSubCommandAliases().put(alias, this);
|
||||
parent.getSubCommandAliases().put(alias.toLowerCase(java.util.Locale.ENGLISH), this);
|
||||
}
|
||||
setUsage("");
|
||||
// Inherit permission prefix
|
||||
|
Loading…
Reference in New Issue
Block a user