Human pass over commands

This commit is contained in:
Mariell Hoversholm committed 2020-09-09 22:16:57 +02:00
1 parent a9f068cc94
commit 830722a2b8
16 files changed
+68 -50

No files matched your search

@@ -15,11 +15,16 @@ import java.util.LinkedHashMap;
public class AliasedChannelCommand {
@NonNull
private final CarbonChat carbonChat;
private final @NonNull ChatChannel chatChannel;
@NonNull
private final ChatChannel chatChannel;
@NonNull
private final String commandName;
public AliasedChannelCommand(CarbonChat carbonChat, @NonNull ChatChannel chatChannel) {
public AliasedChannelCommand(@NonNull CarbonChat carbonChat, @NonNull ChatChannel chatChannel) {
this.carbonChat = carbonChat;
this.chatChannel = chatChannel;
@@ -43,7 +48,7 @@ public class AliasedChannelCommand {
.register();
}
private void setChannel(Player player, Object[] args) {
private void setChannel(@NonNull Player player, @NonNull Object @NonNull [] args) {
ChatUser user = carbonChat.getUserService().wrap(player);
if (user.getChannelSettings(getChatChannel()).isIgnored()) {
@@ -63,7 +68,7 @@ public class AliasedChannelCommand {
"channel", getChatChannel().getName()));
}
private void sendMessage(Player player, Object[] args) {
private void sendMessage(@NonNull Player player, @NonNull Object @NonNull [] args) {
ChatUser user = carbonChat.getUserService().wrap(player);
String message = (String) args[0];
@@ -72,10 +77,12 @@ public class AliasedChannelCommand {
carbonChat.getAdventureManager().getAudiences().console().sendMessage(component);
}
public @NonNull ChatChannel getChatChannel() {
@NonNull
public ChatChannel getChatChannel() {
return chatChannel;
}
@NonNull
public String getCommandName() {
return commandName;
}