From 5a7519440eb0f7c5aa6543b136d4f33fe099d954 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Wed, 8 Jun 2022 22:27:24 +0200 Subject: [PATCH] (1.19) Make timings link clickable (#7897) --- patches/server/Timings-v2.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/server/Timings-v2.patch b/patches/server/Timings-v2.patch index 29409c6ee5..bf8c68bc48 100644 --- a/patches/server/Timings-v2.patch +++ b/patches/server/Timings-v2.patch @@ -194,6 +194,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +import com.google.common.collect.Sets; +import io.papermc.paper.adventure.PaperAdventure; ++import net.kyori.adventure.text.event.ClickEvent; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; +import net.minecraft.server.MinecraftServer; @@ -511,7 +512,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + timingsURL = con.getHeaderField("Location"); -+ listeners.sendMessage(text("View Timings Report: " + timingsURL, NamedTextColor.GREEN)); ++ listeners.sendMessage(text("View Timings Report: ", NamedTextColor.GREEN).append(text(timingsURL).clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, timingsURL)))); + + if (response != null && !response.isEmpty()) { + Bukkit.getLogger().log(Level.INFO, "Timing Response: " + response);