mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
90fe0d58a5
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry 255b2aa1 SPIGOT-7080: Add World#locateNearestBiome ff984826 Remove javadoc.io doc links CraftBukkit Changes: 71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler 38c599f9d PR-1272: Only allow one entity in CraftItem instead of two f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld Spigot Changes: e0e223fe Remove javadoc.io doc links
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lama06 <andreasprues36@gmail.com>
|
|
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 b62ccc0aed92b825805e540c67fbf15399e1500d..f7be775567a9aba1933bc3cf5d4e887ab589d778 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
|