Progress on CarbonChat-Common

This commit is contained in:
Draycia committed 2020-09-25 01:44:39 -07:00
1 parent 508ad88e26
commit 64295c84ea
60 files changed
+889 -556

No files matched your search

@@ -15,17 +15,16 @@ import net.draycia.carbon.commands.SpyChannelCommand;
import net.draycia.carbon.commands.SudoChannelCommand;
import net.draycia.carbon.commands.ToggleCommand;
import net.draycia.carbon.api.commands.CommandSettings;
import net.draycia.carbon.CarbonChat;
import net.draycia.carbon.CarbonChatBukkit;
import net.draycia.carbon.commands.ShadowMuteCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.checkerframework.checker.nullness.qual.NonNull;
public class CommandManager {
@NonNull
private final CarbonChat carbonChat;
private final CarbonChatBukkit carbonChat;
public CommandManager(@NonNull final CarbonChat carbonChat) {
public CommandManager(@NonNull final CarbonChatBukkit carbonChat) {
this.carbonChat = carbonChat;
this.reloadCommands();
@@ -51,10 +50,7 @@ public class CommandManager {
@NonNull
private CommandSettings commandSettings(@NonNull final String command) {
final ConfigurationSection section = this.carbonChat.commandsConfig().getConfigurationSection(command);
return new CommandSettings(section.getBoolean("enabled"), section.getString("name"),
section.getStringList("aliases"));
return this.carbonChat.commandSettingsRegistry().get(command);
}
}