8000 Fix `CommandNamespaceTests` · CommandAPI/CommandAPI@b619b6f · GitHub
[go: up one dir, main page]

Skip to content

Commit b619b6f

Browse files
committed
Fix CommandNamespaceTests
I messed this up when rebasing changes from #509 into `dev/command-build-rewrite`
1 parent 207785b commit b619b6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/SpigotCommandRegistration.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,13 @@ public void postCommandRegistration(List<RegisteredCommand> registeredCommands,
239239
// Do the same for the namespaced version of the command (which is never empty on Bukkit forks)
240240
String namespace = commonCommandInformation.namespace().toLowerCase();
241241
permissionsToFix.putIfAbsent(namespace + ":" + commandName, permission);
242+
243+
// Do the same for the aliases
244+
for (String alias : commonCommandInformation.aliases()) {
245+
alias = alias.toLowerCase();
246+
permissionsToFix.putIfAbsent(alias, permission);
247+
permissionsToFix.putIfAbsent(namespace + ":" + alias, permission);
248+
}
242249
}
243250
}
244251

0 commit comments

Comments
 (0)
0