SPIGOT-7435: Add TeleportCause#EXIT_BED
This commit is contained in:
parent
b435e8e8d3
commit
f7fa6d9935
@ -667,7 +667,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -989,6 +1303,24 @@
|
||||
@@ -989,13 +1303,31 @@
|
||||
|
||||
@Override
|
||||
public void stopSleepInBed(boolean flag, boolean flag1) {
|
||||
@ -692,6 +692,14 @@
|
||||
if (this.isSleeping()) {
|
||||
this.serverLevel().getChunkSource().broadcastAndSend(this, new PacketPlayOutAnimation(this, 2));
|
||||
}
|
||||
|
||||
super.stopSleepInBed(flag, flag1);
|
||||
if (this.connection != null) {
|
||||
- this.connection.teleport(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
+ this.connection.teleport(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot(), TeleportCause.EXIT_BED); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1037,8 +1369,9 @@
|
||||
this.connection.send(new PacketPlayOutOpenSignEditor(tileentitysign.getBlockPos(), flag));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user