Fix spacing

This commit is contained in:
Draycia committed 2020-09-09 20:20:45 -07:00
1 parent a8788c7d3d
commit a47ff4e7b2
74 files changed
+5000 -4927

No files matched your search

@@ -11,33 +11,33 @@ import org.checkerframework.checker.nullness.qual.NonNull;
public class ChatReloadCommand {
@NonNull
private final CarbonChat carbonChat;
@NonNull
private final CarbonChat carbonChat;
public ChatReloadCommand(@NonNull CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
this.carbonChat = carbonChat;
public ChatReloadCommand(@NonNull CarbonChat carbonChat, @NonNull CommandSettings commandSettings) {
this.carbonChat = carbonChat;
if (!commandSettings.isEnabled()) {
return;
}
CommandUtils.handleDuplicateCommands(commandSettings);
new CommandAPICommand(commandSettings.getName())
.withAliases(commandSettings.getAliasesArray())
.withPermission(CommandPermission.fromString("carbonchat.reload"))
.executes(this::execute)
.register();
if (!commandSettings.isEnabled()) {
return;
}
private void execute(@NonNull CommandSender sender, @NonNull Object @NonNull [] args) {
carbonChat.reloadConfig();
carbonChat.reloadFilters();
CommandUtils.handleDuplicateCommands(commandSettings);
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("reloaded"),
"br", "\n");
new CommandAPICommand(commandSettings.getName())
.withAliases(commandSettings.getAliasesArray())
.withPermission(CommandPermission.fromString("carbonchat.reload"))
.executes(this::execute)
.register();
}
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
}
private void execute(@NonNull CommandSender sender, @NonNull Object @NonNull [] args) {
carbonChat.reloadConfig();
carbonChat.reloadFilters();
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("reloaded"),
"br", "\n");
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
}
}