diff options
author | Noah van der Aa <[email protected]> | 2022-06-12 10:07:35 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-12 10:07:35 +0200 |
commit | 3925a53dd0fbe6bb99c15228b618dddd67017dcd (patch) | |
tree | f8e30eff77b902af57f0c4a2dac7721d1dd5abf2 | |
parent | 276d830d223ddf68611beacc248285ae5a4e8a1f (diff) | |
download | Paper-3925a53dd0fbe6bb99c15228b618dddd67017dcd.tar.gz Paper-3925a53dd0fbe6bb99c15228b618dddd67017dcd.zip |
Make timings link clickable (#7944)
-rw-r--r-- | patches/server/0012-Timings-v2.patch | 11 | ||||
-rw-r--r-- | patches/server/0790-Configurable-feature-seeds.patch | 4 | ||||
-rw-r--r-- | patches/server/0854-Replace-player-chunk-loader-system.patch | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/patches/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch index bf5e41f721..1639901257 100644 --- a/patches/server/0012-Timings-v2.patch +++ b/patches/server/0012-Timings-v2.patch @@ -163,10 +163,10 @@ index 0000000000000000000000000000000000000000..b47b7dce26805badd422c1867733ff4b +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 0000000000000000000000000000000000000000..4092a227a540a1c5cfb95efcc2a36e049b9a979c +index 0000000000000000000000000000000000000000..46297ac0a19fd2398ab777a381eff4d0a256161e --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -0,0 +1,384 @@ +@@ -0,0 +1,385 @@ +/* + * This file is licensed under the MIT License (MIT). + * @@ -194,6 +194,7 @@ index 0000000000000000000000000000000000000000..4092a227a540a1c5cfb95efcc2a36e04 + +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..4092a227a540a1c5cfb95efcc2a36e04 + } + + 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); @@ -1327,7 +1328,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7d624f741291cad59545e465db9c46e56581ed8a..628ae2171c42d04b418001bf542e25ebe12bb18e 100644 +index 9dd29a669a10735819d3be03e4693850de58bb28..96c59b0e5ac3d36c8ecd513b64723e7dbe5d9b3a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -210,6 +210,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1707,7 +1708,7 @@ index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e2270d75c1ffaf0b68300f0734987e86ab6fedda..4a04536ecdeb055fd32272884f6057e5d04f1035 100644 +index 81e78644417764cee33f81cdb116a91fb1d8ccf3..a40995140db011271bd092b0b7415d1eee0e8b18 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2361,12 +2361,31 @@ public final class CraftServer implements Server { diff --git a/patches/server/0790-Configurable-feature-seeds.patch b/patches/server/0790-Configurable-feature-seeds.patch index a1a4ab8892..9fdc850405 100644 --- a/patches/server/0790-Configurable-feature-seeds.patch +++ b/patches/server/0790-Configurable-feature-seeds.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable feature seeds Co-authored-by: Thonk <[email protected]> diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index 4092a227a540a1c5cfb95efcc2a36e049b9a979c..e2f60115370f19e935eb3b14d5de99aa4126c6b0 100644 +index 46297ac0a19fd2398ab777a381eff4d0a256161e..78280fb3bcd8d792a58ece6d735e0824ea4be536 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -282,7 +282,7 @@ public class TimingsExport extends Thread { +@@ -283,7 +283,7 @@ public class TimingsExport extends Thread { JSONObject object = new JSONObject(); for (String key : config.getKeys(false)) { String fullKey = (parentKey != null ? parentKey + "." + key : key); diff --git a/patches/server/0854-Replace-player-chunk-loader-system.patch b/patches/server/0854-Replace-player-chunk-loader-system.patch index 4083c9933e..e46ef71b53 100644 --- a/patches/server/0854-Replace-player-chunk-loader-system.patch +++ b/patches/server/0854-Replace-player-chunk-loader-system.patch @@ -67,10 +67,10 @@ determined by the number of players on the server multiplied by the whatever `global-max-concurrent-loads` is configured to. diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index e2f60115370f19e935eb3b14d5de99aa4126c6b0..f3bf9df8c0bd56cad461210ce8551ade3a220b6b 100644 +index 78280fb3bcd8d792a58ece6d735e0824ea4be536..06bff37e4c1fddd3be6343049a66787c63fb420c 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -161,7 +161,11 @@ public class TimingsExport extends Thread { +@@ -162,7 +162,11 @@ public class TimingsExport extends Thread { pair("gamerules", toObjectMapper(world.getWorld().getGameRules(), rule -> { return pair(rule, world.getWorld().getGameRuleValue(rule)); })), |