From 66966c6efe8908236f1c2439b741b5b94ef1467b Mon Sep 17 00:00:00 2001 From: Jonas_Jones Date: Sat, 4 May 2024 20:53:27 +0200 Subject: [PATCH] Fixed mcweb command --- .../java/me/jonasjones/mcwebserver/commands/McWebCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/jonasjones/mcwebserver/commands/McWebCommand.java b/src/main/java/me/jonasjones/mcwebserver/commands/McWebCommand.java index b4a292c..d7ff5ad 100644 --- a/src/main/java/me/jonasjones/mcwebserver/commands/McWebCommand.java +++ b/src/main/java/me/jonasjones/mcwebserver/commands/McWebCommand.java @@ -42,7 +42,7 @@ public class McWebCommand { if (MC_SERVER != null) { // get the player name String playerName = Objects.requireNonNull(context.getSource().getPlayer()).getName().getString(); - MC_SERVER.getCommandManager().executeWithPrefix(MC_SERVER.getCommandSource(), "tellraw " + playerName + " [\"\",\"Token (will only show once): \",\"\\n\",\"[\",{\"text\":\"" + result + "\",\"color\":\"green\",\"clickEvent\":{\"action\":\"copy_to_clipboard\",\"value\":\"\"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"Click to Copy to Clipboard\"]}},\"]\"]"); + MC_SERVER.getCommandManager().executeWithPrefix(MC_SERVER.getCommandSource(), "tellraw " + playerName + " [\"\",\"Token: [\",{\"text\":\"" + result + "\",\"color\":\"green\",\"clickEvent\":{\"action\":\"copy_to_clipboard\",\"value\":\"" + result + "\"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"Click to Copy to Clipboard\"]}},\"]\"]"); return 1; } context.getSource().sendFeedback(() -> Text.of("Failed to create token (Unknown Error)"), false);