Use keys instead of names when possible

This commit is contained in:
Draycia committed 2020-08-10 19:32:43 -07:00
1 parent 9b9ca554e4
commit 22a068ff09
6 files changed
+28 -10

No files matched your search

@@ -26,7 +26,7 @@ public class CommandManager {
for (ChatChannel chatChannel : carbonChat.getChannelManager().getRegistry().values()) {
if (chatChannel.canPlayerUse(user)) {
completions.add(chatChannel.getName());
completions.add(chatChannel.getKey());
}
}
@@ -37,7 +37,7 @@ public class CommandManager {
List<String> completions = new ArrayList<>();
for (ChatChannel chatChannel : carbonChat.getChannelManager().getRegistry().values()) {
completions.add(chatChannel.getName());
completions.add(chatChannel.getKey());
}
return completions;
@@ -47,7 +47,7 @@ public class CommandManager {
String name = context.popFirstArg();
for (ChatChannel chatChannel : carbonChat.getChannelManager().getRegistry().values()) {
if (chatChannel.getName().equalsIgnoreCase(name)) {
if (chatChannel.getKey().equalsIgnoreCase(name)) {
return chatChannel;
}
}