SteamWar/BungeeCore
Archiviert
13
2

Hotfix SWCommand on hover
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-16 21:09:50 +02:00
Ursprung 49043c4b0c
Commit cccba31c46

Datei anzeigen

@ -20,6 +20,7 @@
package de.steamwar.command; package de.steamwar.command;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message;
import de.steamwar.messages.ChatSender; import de.steamwar.messages.ChatSender;
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
@ -150,7 +151,7 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
for (String s : subCommand.description) { for (String s : subCommand.description) {
String hover = "§8/§e" + command.getName() + " " + String.join(" ", subCommand.subCommand); String hover = "§8/§e" + command.getName() + " " + String.join(" ", subCommand.subCommand);
String suggest = "/" + 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) { } catch (Exception e) {
BungeeCore.get().getLogger().log(Level.WARNING, "Failed to send description of registered method '" + subCommand.method + "' with description '" + subCommand.description + "'", e); BungeeCore.get().getLogger().log(Level.WARNING, "Failed to send description of registered method '" + subCommand.method + "' with description '" + subCommand.description + "'", e);