From cccba31c4645fadfc98ea8dc556871c6d4f1173f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 21:09:50 +0200 Subject: [PATCH] Hotfix SWCommand on hover --- src/de/steamwar/command/SWCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/command/SWCommand.java b/src/de/steamwar/command/SWCommand.java index 36aaf64..211bb60 100644 --- a/src/de/steamwar/command/SWCommand.java +++ b/src/de/steamwar/command/SWCommand.java @@ -20,6 +20,7 @@ package de.steamwar.command; import de.steamwar.bungeecore.BungeeCore; +import de.steamwar.bungeecore.Message; import de.steamwar.messages.ChatSender; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.chat.ClickEvent; @@ -150,7 +151,7 @@ public class SWCommand extends AbstractSWCommand { for (String s : subCommand.description) { String hover = "§8/§e" + command.getName() + " " + String.join(" ", subCommand.subCommand); String suggest = "/" + command.getName() + " " + String.join(" ", subCommand.subCommand); - chatSender.prefixless(s, hover, new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, suggest)); + chatSender.prefixless(s, new Message("PLAIN_STRING", hover), new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, suggest)); } } catch (Exception e) { BungeeCore.get().getLogger().log(Level.WARNING, "Failed to send description of registered method '" + subCommand.method + "' with description '" + subCommand.description + "'", e);