diff --git a/src/main/java/tk/sciwhiz12/concord/ChatBot.java b/src/main/java/tk/sciwhiz12/concord/ChatBot.java index 3b4121e0..73178d7f 100644 --- a/src/main/java/tk/sciwhiz12/concord/ChatBot.java +++ b/src/main/java/tk/sciwhiz12/concord/ChatBot.java @@ -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); @@ -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); diff --git a/src/main/java/tk/sciwhiz12/concord/Concord.java b/src/main/java/tk/sciwhiz12/concord/Concord.java index 9abf3555..dc611cd8 100644 --- a/src/main/java/tk/sciwhiz12/concord/Concord.java +++ b/src/main/java/tk/sciwhiz12/concord/Concord.java @@ -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; diff --git a/src/main/java/tk/sciwhiz12/concord/ConcordConfig.java b/src/main/java/tk/sciwhiz12/concord/ConcordConfig.java index 3f1c4334..e42e429f 100644 --- a/src/main/java/tk/sciwhiz12/concord/ConcordConfig.java +++ b/src/main/java/tk/sciwhiz12/concord/ConcordConfig.java @@ -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; @@ -149,8 +148,8 @@ 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); @@ -158,7 +157,7 @@ public static void register(ModContainer container) { "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)", diff --git a/src/main/java/tk/sciwhiz12/concord/msg/chat/WebhookChatForwarder.java b/src/main/java/tk/sciwhiz12/concord/msg/chat/WebhookChatForwarder.java index 361b3e8f..eb68f4d7 100644 --- a/src/main/java/tk/sciwhiz12/concord/msg/chat/WebhookChatForwarder.java +++ b/src/main/java/tk/sciwhiz12/concord/msg/chat/WebhookChatForwarder.java @@ -78,7 +78,7 @@ private Set getAllowedMentions() { mentions.add(Message.MentionType.USER); } if (ConcordConfig.ALLOW_ROLE_MENTIONS.get()) { - mentions.add(Message.MentionType.ROLE); + mentions.add(Message.MentionType.ROLE); } return mentions; } diff --git a/src/main/java/tk/sciwhiz12/concord/util/IntelligentTranslator.java b/src/main/java/tk/sciwhiz12/concord/util/IntelligentTranslator.java index b3d32761..43a97f8a 100644 --- a/src/main/java/tk/sciwhiz12/concord/util/IntelligentTranslator.java +++ b/src/main/java/tk/sciwhiz12/concord/util/IntelligentTranslator.java @@ -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; diff --git a/src/main/java/tk/sciwhiz12/concord/util/Translation.java b/src/main/java/tk/sciwhiz12/concord/util/Translation.java index 447581c5..33a853a0 100644 --- a/src/main/java/tk/sciwhiz12/concord/util/Translation.java +++ b/src/main/java/tk/sciwhiz12/concord/util/Translation.java @@ -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}).