1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-30 19:40:37 +01:00

Win Screen API

== AT ==
public net.minecraft.server.level.ServerPlayer seenCredits
This commit is contained in:
Lama06 2023-01-21 13:53:23 +01:00
parent d648e75653
commit b8ad599ceb

View file

@ -1312,6 +1312,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