From 2a971dd0622d2d5ab4d33622fc168f1ad20ffdc9 Mon Sep 17 00:00:00 2001 From: Rime <81419447+Emirlol@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:17:07 +0300 Subject: [PATCH] Change click event yet again to send run a command to send in chat --- .../skyblock/events/greatspook/MathTeacherHelper.java | 9 ++++----- src/main/resources/assets/skyblocker/lang/en_us.json | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/events/greatspook/MathTeacherHelper.java b/src/main/java/de/hysky/skyblocker/skyblock/events/greatspook/MathTeacherHelper.java index 59476399e9..c78334c4cc 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/events/greatspook/MathTeacherHelper.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/events/greatspook/MathTeacherHelper.java @@ -15,7 +15,6 @@ /** *

A helper class for the Math Teachers that can spawn after killing Primal Fears in the Great Spook event.

- *

It only shows the result and allows for easily copying rather than sending the result to chat to not breach any hypixel rules.

*/ public final class MathTeacherHelper { @Init @@ -24,7 +23,7 @@ public static void init() { } /** - * Appends the result of the math expression to the message and a copy to clipboard text for, well, copying the result to the clipboard. + * Appends the result of the math expression to the message and a send in chat text that, well, sends the result in chat. */ public static Text onMessage(Text message, boolean overlay) { if (overlay) return message; @@ -41,11 +40,11 @@ public static Text onMessage(Text message, boolean overlay) { .append(Text.literal(result) .formatted(Formatting.AQUA)) .append(ScreenTexts.SPACE) - .append(Text.translatable("text.skyblocker.clickToSuggest") + .append(Text.translatable("text.skyblocker.clickToSend") .formatted(Formatting.GREEN) .styled(style -> - style.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, result)) - .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Constants.PREFIX.get().append(Text.translatable("text.skyblocker.clickToSuggest.@Tooltip")))) + style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ac " + result)) + .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Constants.PREFIX.get().append(Text.translatable("text.skyblocker.clickToSend.@Tooltip")))) )); } catch (Exception e) { return message; diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index ebf5f9a438..168c030e28 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -28,8 +28,8 @@ "text.skyblocker.translate": "Translate", "text.skyblocker.modrinth": "Modrinth", "text.skyblocker.discord": "Discord", - "text.skyblocker.clickToSuggest": "[Click To Suggest In Chat]", - "text.skyblocker.clickToSuggest.@Tooltip": "Click to suggest this in chat.", + "text.skyblocker.clickToSend": "[Click To Send In Chat]", + "text.skyblocker.clickToSend.@Tooltip": "Click to send this in chat.", "skyblocker.skyblockerScreen": "Skyblocker Main Screen",