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:
parent
d648e75653
commit
b8ad599ceb
1 changed files with 19 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue