Skip to content

Commit

Permalink
Perform formatting cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 committed Feb 28, 2024
1 parent 27a95bc commit 6098ac4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tk/sciwhiz12/concord/ChatBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void onReady(ReadyEvent event) {
avatarUrl = configuredAvatarUrl;
Concord.LOGGER.debug("Using configured webhook avatar URL: {}", avatarUrl);
} else {
avatarUrl = null;
avatarUrl = null;
}

final Matcher urlMatcher = Webhook.WEBHOOK_URL.matcher(webhookID);
Expand All @@ -123,7 +123,7 @@ public void onReady(ReadyEvent event) {
Concord.LOGGER.info(BOT, "Enabled webhook chat forwarder, using webhook with ID {}", urlMatcher.group("id"));
} else {
discord.retrieveWebhookById(webhookID).queue(webhook -> {

chatForwarder = new WebhookChatForwarder(this, webhook, avatarUrl);

Concord.LOGGER.info(BOT, "Enabled webhook chat forwarder, using webhook with ID {}", webhookID);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/tk/sciwhiz12/concord/Concord.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import tk.sciwhiz12.concord.command.ReportCommand;
import tk.sciwhiz12.concord.command.SayCommandHook;
import tk.sciwhiz12.concord.features.ConcordFeatures;
import tk.sciwhiz12.concord.msg.Messaging;
import tk.sciwhiz12.concord.network.ConcordNetwork;
import tk.sciwhiz12.concord.util.Messages;

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/tk/sciwhiz12/concord/ConcordConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package tk.sciwhiz12.concord;

import net.neoforged.fml.ModContainer;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.common.ModConfigSpec;
import tk.sciwhiz12.concord.util.Messages;
Expand Down Expand Up @@ -149,16 +148,16 @@ public static void register(ModContainer container) {
.define("use_custom_formatting", false);

USE_LEGACY_FORMATTING = builder.comment("Allow Discord users to put legacy-style chat formatting (&5, etc) in a message.",
"This will cause in-game messages to have color, bold, italic, strikethrough and \"obfuscated\" formatting.",
"Note however, that this only works with vanilla formatting codes, and is likely to cause weirdness.")
"This will cause in-game messages to have color, bold, italic, strikethrough and \"obfuscated\" formatting.",
"Note however, that this only works with vanilla formatting codes, and is likely to cause weirdness.")
.define("use_legacy_formatting", false);


HIDE_CROWN = builder.comment("Configures when the Server Owner crown is visible to clients.",
"ALWAYS means the crown is always visible, NEVER means the crown is never visible.",
"WITHOUT_ADMINISTRATORS means it is only visible when there are no hoisted Administrator roles.")
.defineEnum("hide_crown", CrownVisibility.WITHOUT_ADMINISTRATORS);

WEBHOOK_AVATAR_URL = builder.comment("The URL used for the avatar when sending messages using the relay webhook.",
"The following placeholders can be used within the URL:",
" - '{uuid}' is replaced with the UUID of the player, without any dashes (e.g 00112233445566778899aabbccddeeff)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private Set<Message.MentionType> getAllowedMentions() {
mentions.add(Message.MentionType.USER);
}
if (ConcordConfig.ALLOW_ROLE_MENTIONS.get()) {
mentions.add(Message.MentionType.ROLE);
mentions.add(Message.MentionType.ROLE);
}
return mentions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
package tk.sciwhiz12.concord.util;

import com.google.common.collect.Maps;
import net.minecraft.network.chat.*;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.Style;
import net.minecraft.network.chat.contents.TranslatableContents;

import javax.annotation.Nullable;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tk/sciwhiz12/concord/util/Translation.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import org.checkerframework.checker.nullness.qual.Nullable;
import tk.sciwhiz12.concord.ConcordConfig;
import tk.sciwhiz12.concord.features.ConcordFeatures;
import tk.sciwhiz12.concord.network.ConcordNetwork;
import tk.sciwhiz12.concord.features.FeatureVersion;
import tk.sciwhiz12.concord.network.ConcordNetwork;

/**
* A message with a translation key and its corresponding default text in English ({@code en_us}).
Expand Down

0 comments on commit 6098ac4

Please sign in to comment.