diff --git a/patches/api/Win-Screen-API.patch b/patches/api/Win-Screen-API.patch new file mode 100644 index 0000000000..a79f2a9912 --- /dev/null +++ b/patches/api/Win-Screen-API.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lama06 +Date: Sat, 21 Jan 2023 13:45:22 +0100 +Subject: [PATCH] Win Screen API + + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + */ + public void sendMap(@NotNull MapView map); + ++ // Paper start ++ /** ++ * Shows the player the win screen that normally is only displayed after one kills the ender dragon ++ * and exits the end for the first time. ++ * In vanilla, the win screen starts with a poem and then continues with the credits but its content can be ++ * changed by using a resource pack. ++ * ++ * @see https://minecraft.fandom.com/wiki/End_Poem#Technical_details ++ */ ++ public void showWinScreen(); ++ // Paper end ++ + // Paper start + /** + * Permanently Bans the Profile and IP address currently used by the player. diff --git a/patches/server/Win-Screen-API.patch b/patches/server/Win-Screen-API.patch new file mode 100644 index 0000000000..e845f93c2f --- /dev/null +++ b/patches/server/Win-Screen-API.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lama06 +Date: Sat, 21 Jan 2023 13:53:23 +0100 +Subject: [PATCH] Win Screen API + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -0,0 +0,0 @@ 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); ++ } ++ // Paper end ++ + @Override + public void setRotation(float yaw, float pitch) { + // Paper start - Teleport API