diff --git a/src/main/java/org/polyfrost/chatting/mixin/ChatStyleMixin.java b/src/main/java/org/polyfrost/chatting/mixin/ChatStyleMixin.java deleted file mode 100644 index 63f929f..0000000 --- a/src/main/java/org/polyfrost/chatting/mixin/ChatStyleMixin.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.polyfrost.chatting.mixin; - -import net.minecraft.event.ClickEvent; -import net.minecraft.util.ChatStyle; -import net.minecraft.util.EnumChatFormatting; -import org.polyfrost.chatting.config.ChattingConfig; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(ChatStyle.class) -public class ChatStyleMixin { - @Shadow - private ClickEvent chatClickEvent; - - @Unique - private boolean chatting$hasURL() { - return ChattingConfig.INSTANCE.getUnderlinedLinks() - && chatClickEvent != null - && chatClickEvent.getAction() == ClickEvent.Action.OPEN_URL; - } - - @Inject(method = "getUnderlined", at = @At("HEAD"), cancellable = true) - private void linkUnderline(CallbackInfoReturnable cir) { - if (chatting$hasURL()) { - cir.setReturnValue(true); - } - } - - @Inject(method = "getColor", at = @At("HEAD"), cancellable = true) - private void linkColor(CallbackInfoReturnable cir) { - if (chatting$hasURL()) { - cir.setReturnValue(EnumChatFormatting.BLUE); - } - } -} diff --git a/src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt b/src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt index a4d0b9e..7354f08 100644 --- a/src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt +++ b/src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt @@ -82,13 +82,6 @@ object ChattingConfig : Config( ) var peekMode = false - @Switch( - name = "Underlined Links", category = "General", - description = "Makes clickable links in chat blue and underlined.", - size = 1 - ) - var underlinedLinks = true - @Switch( name = "Smooth Chat Messages", category = "Animations", subcategory = "Messages", diff --git a/src/main/resources/mixins.chatting.json b/src/main/resources/mixins.chatting.json index 5f47765..c2738ee 100644 --- a/src/main/resources/mixins.chatting.json +++ b/src/main/resources/mixins.chatting.json @@ -25,8 +25,5 @@ "GuiUtilsMixin", "HUDUtilsMixin", "InventoryPlayerMixin" - ], - "mixins": [ - "ChatStyleMixin" ] }