mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
(1.19) Make timings link clickable (#7897)
This commit is contained in:
parent
da6d6a433d
commit
5a7519440e
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue