mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Rename _commandSettings to defaultCommandSettings and use for default command config
This commit is contained in:
21 files changed
+22
-22
No files matched your search
@@ -31,7 +31,7 @@ public abstract class CarbonCommand {
|
||||
private @Nullable CommandSettings commandSettings = null;
|
||||
|
||||
public CommandSettings commandSettings() {
|
||||
return Objects.requireNonNullElseGet(this.commandSettings, this::_commandSettings);
|
||||
return Objects.requireNonNullElseGet(this.commandSettings, this::defaultCommandSettings);
|
||||
}
|
||||
|
||||
public void commandSettings(final @NonNull CommandSettings commandSettings) {
|
||||
@@ -40,7 +40,7 @@ public abstract class CarbonCommand {
|
||||
|
||||
public abstract void init();
|
||||
|
||||
protected abstract CommandSettings _commandSettings();
|
||||
public abstract CommandSettings defaultCommandSettings();
|
||||
|
||||
public abstract Key key();
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public final class ClearChatCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("clearchat", "chatclear", "cc");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public final class ContinueCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("continue", "c");
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class DebugCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("carbondebug", "cdebug");
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class HelpCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("carbon");
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public final class IgnoreCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("ignore", "block");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public final class IgnoreListCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("ignorelist", "listignores");
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public final class JoinCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("join");
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public final class LeaveCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("leave");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class MuteCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("mute");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public final class MuteInfoCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("muteinfo", "muted");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public final class NicknameCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("nickname", "nick");
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ public final class PartyCommands extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("party", "group");
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class ReloadCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("carbon");
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public final class ReplyCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("reply", "r");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class ToggleMessagesCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("togglemsg", "togglepm");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public final class UnignoreCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("unignore", "unblock");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class UnmuteCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("unmute");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ public final class UpdateUsernameCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("updateusername", "updatename");
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class WhisperCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandSettings _commandSettings() {
|
||||
public CommandSettings defaultCommandSettings() {
|
||||
return new CommandSettings("whisper", "w", "message", "msg", "m", "tell");
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class CloudUtils {
|
||||
final Map<Key, CommandSettings> settings = new HashMap<>();
|
||||
|
||||
for (final var command : commands.get()) {
|
||||
settings.put(command.key(), command.commandSettings());
|
||||
settings.put(command.key(), command.defaultCommandSettings());
|
||||
}
|
||||
|
||||
return settings;
|
||||
|
||||
Reference in new issue
Block a user