mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-29 19:51:30 +01:00
Win Screen API
== AT == public net.minecraft.server.level.ServerPlayer seenCredits
This commit is contained in:
parent
d648e75653
commit
b8ad599ceb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user