mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 06:28:54 +00:00
Human pass over commands
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user