diff options
author | Nassim Jahnke <[email protected]> | 2023-09-23 11:45:34 +1000 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2023-09-23 11:45:34 +1000 |
commit | a353f4d207994e0f2dfe55047cffbcb98f74bafc (patch) | |
tree | d16ee406ab9cd0d19c35f1c318d59e28c23cf6d6 /patches/server/0911-Win-Screen-API.patch | |
parent | a50d7c340b9922eab16fd9f246269b4c75453648 (diff) | |
download | Paper-a353f4d207994e0f2dfe55047cffbcb98f74bafc.tar.gz Paper-a353f4d207994e0f2dfe55047cffbcb98f74bafc.zip |
Readd network optimization patch
Diffstat (limited to 'patches/server/0911-Win-Screen-API.patch')
-rw-r--r-- | patches/server/0911-Win-Screen-API.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/server/0911-Win-Screen-API.patch b/patches/server/0911-Win-Screen-API.patch new file mode 100644 index 0000000000..06a50044be --- /dev/null +++ b/patches/server/0911-Win-Screen-API.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lama06 <[email protected]> +Date: Sat, 21 Jan 2023 13:53:23 +0100 +Subject: [PATCH] Win Screen API + +== AT == +public net.minecraft.server.level.ServerPlayer seenCredits + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 3db0278b66d11cf2d7e4c415e859ed39efbec5d7..e2dd9441bdcebe0a31f2047b0d704c2b90d32dfa 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1215,6 +1215,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + this.getHandle().connection.send(packet); + } + ++ // Paper start ++ @Override ++ public void showWinScreen() { ++ if (getHandle().connection == null) return; ++ var packet = new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 1); ++ getHandle().connection.send(packet); ++ } ++ ++ @Override ++ public boolean hasSeenWinScreen() { ++ return getHandle().seenCredits; ++ } ++ ++ @Override ++ public void setHasSeenWinScreen(boolean hasSeenWinScreen) { ++ getHandle().seenCredits = hasSeenWinScreen; ++ } ++ // Paper end ++ + @Override + public void setRotation(float yaw, float pitch) { + // Paper start - Teleport API |