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

@@ -18,9 +18,10 @@ import java.util.LinkedHashMap;
public class ToggleCommand {
@NonNull
private final CarbonChat carbonChat;
public ToggleCommand(CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
public ToggleCommand(@NonNull CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
this.carbonChat = carbonChat;
if (!commandSettings.isEnabled()) {
@@ -51,7 +52,7 @@ public class ToggleCommand {
.register();
}
private void executeSelf(Player player, Object[] args) {
private void executeSelf(@NonNull Player player, @NonNull Object @NonNull [] args) {
ChatUser user = carbonChat.getUserService().wrap(player);
ChatChannel channel = (ChatChannel) args[0];
@@ -73,7 +74,7 @@ public class ToggleCommand {
"color", "<color:" + channel.getChannelColor(user).toString() + ">", "channel", channel.getName()));
}
private void executeOther(@NonNull CommandSender sender, Object[] args) {
private void executeOther(@NonNull CommandSender sender, @NonNull Object @NonNull [] args) {
ChatUser user = (ChatUser) args[0];
ChatChannel channel = (ChatChannel) args[1];