mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Register aliases for aliased channel commands
This commit is contained in:
1 parent
a629f97a52
commit
7879e47ea7
5 files changed
+7
-7
No files matched your search
@@ -61,8 +61,8 @@ public class EmptyTextChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable List<String> aliases() {
|
||||
return null;
|
||||
public @NonNull List<String> aliases() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface TextChannel extends ChatChannel, ForwardingAudience {
|
||||
|
||||
@Nullable String messagePrefix();
|
||||
|
||||
@Nullable List<String> aliases();
|
||||
@NonNull List<String> aliases();
|
||||
|
||||
boolean primaryGroupOnly();
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@ public final class ChannelOptions {
|
||||
return this.colorPriorities;
|
||||
}
|
||||
|
||||
public @Nullable List<String> aliases() {
|
||||
public @NonNull List<String> aliases() {
|
||||
return this.aliases;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -527,7 +527,7 @@ public class CarbonChatChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable List<String> aliases() {
|
||||
public @NonNull List<String> aliases() {
|
||||
return this.options().aliases();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ public class AliasedChannelCommand {
|
||||
this.commandName = chatChannel.key();
|
||||
|
||||
commandManager.command(
|
||||
commandManager.commandBuilder(this.commandName,
|
||||
commandManager.commandBuilder(this.commandName, this.chatChannel.aliases(),
|
||||
commandManager.createDefaultCommandMeta())
|
||||
.senderType(PlayerUser.class) // player
|
||||
.permission("carbonchat.channel")
|
||||
@@ -35,7 +35,7 @@ public class AliasedChannelCommand {
|
||||
);
|
||||
|
||||
commandManager.command(
|
||||
commandManager.commandBuilder(this.commandName,
|
||||
commandManager.commandBuilder(this.commandName, this.chatChannel.aliases(),
|
||||
commandManager.createDefaultCommandMeta())
|
||||
.senderType(PlayerUser.class) // player
|
||||
.permission("carbonchat.channel.message")
|
||||
|
||||
Reference in new issue
Block a user