From 4d2c73dc271c1255c86ca9d811468e8b36d48640 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:11:08 +0200 Subject: Fix: Duplicate Custom Keybinds (#1387) --- src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index 3a88fd51f..d2dd5c9b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt @@ -52,6 +52,19 @@ object ChatUtils { internalChat(USER_ERROR_PREFIX + message) } + /** + * Sends a message to the user that they did something incorrectly. + * Runs a command when clicked to fix the issue. + * + * @param message The message to be sent + * @param command The command to be executed when the message is clicked + * + * @see USER_ERROR_PREFIX + */ + fun clickableUserError(message: String, command: String) { + internalChat(createClickableChat(USER_ERROR_PREFIX + message, command)) + } + /** * Sends a message to the user that an error occurred caused by something in the code. * This should be used for errors that are not caused by the user. -- cgit