mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
SPIGOT-5988: Bedspawn doesn't clear after dying when spawn is blocked
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
ea404e3d82
commit
ab1a1deb6b
1 changed files with 12 additions and 11 deletions
|
@ -435,7 +435,7 @@
|
|||
|
||||
entityplayer1.connection = entityplayer.connection;
|
||||
entityplayer1.copyFrom(entityplayer, flag);
|
||||
@@ -495,49 +680,110 @@
|
||||
@@ -495,49 +680,111 @@
|
||||
|
||||
boolean flag2 = false;
|
||||
|
||||
|
@ -482,6 +482,7 @@
|
|||
+ location = new Location(worldserver1.getWorld(), vec3d.x, vec3d.y, vec3d.z, f1, 0.0F);
|
||||
+ } else if (blockposition != null) {
|
||||
+ entityplayer1.connection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
|
||||
+ entityplayer1.setRespawnPosition(null, null, 0f, false, false); // CraftBukkit - SPIGOT-5988: Clear respawn location when obstructed
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -570,7 +571,7 @@
|
|||
return entityplayer1;
|
||||
}
|
||||
|
||||
@@ -550,7 +796,18 @@
|
||||
@@ -550,7 +797,18 @@
|
||||
|
||||
public void tick() {
|
||||
if (++this.sendAllPlayerInfoIn > 600) {
|
||||
|
@ -590,7 +591,7 @@
|
|||
this.sendAllPlayerInfoIn = 0;
|
||||
}
|
||||
|
||||
@@ -567,6 +824,25 @@
|
||||
@@ -567,6 +825,25 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -616,7 +617,7 @@
|
|||
public void a(Packet<?> packet, ResourceKey<World> resourcekey) {
|
||||
Iterator iterator = this.players.iterator();
|
||||
|
||||
@@ -669,6 +945,7 @@
|
||||
@@ -669,6 +946,7 @@
|
||||
entityplayer.connection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0));
|
||||
}
|
||||
|
||||
|
@ -624,7 +625,7 @@
|
|||
this.server.getCommandDispatcher().a(entityplayer);
|
||||
}
|
||||
|
||||
@@ -701,6 +978,12 @@
|
||||
@@ -701,6 +979,12 @@
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) this.players.get(i);
|
||||
|
||||
|
@ -637,7 +638,7 @@
|
|||
if (entityplayer != entityhuman && entityplayer.level.getDimensionKey() == resourcekey) {
|
||||
double d4 = d0 - entityplayer.locX();
|
||||
double d5 = d1 - entityplayer.locY();
|
||||
@@ -740,23 +1023,34 @@
|
||||
@@ -740,23 +1024,34 @@
|
||||
public void reloadWhitelist() {}
|
||||
|
||||
public void a(EntityPlayer entityplayer, WorldServer worldserver) {
|
||||
|
@ -677,7 +678,7 @@
|
|||
}
|
||||
|
||||
public int getPlayerCount() {
|
||||
@@ -807,12 +1101,22 @@
|
||||
@@ -807,12 +1102,22 @@
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
|
@ -702,7 +703,7 @@
|
|||
public void sendMessage(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype, UUID uuid) {
|
||||
this.server.sendMessage(ichatbasecomponent, uuid);
|
||||
Iterator iterator = this.players.iterator();
|
||||
@@ -840,16 +1144,23 @@
|
||||
@@ -840,16 +1145,23 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -730,7 +731,7 @@
|
|||
Path path = file2.toPath();
|
||||
|
||||
if (FileUtils.a(path) && FileUtils.b(path) && path.startsWith(file.getPath()) && file2.isFile()) {
|
||||
@@ -858,7 +1169,7 @@
|
||||
@@ -858,7 +1170,7 @@
|
||||
}
|
||||
|
||||
serverstatisticmanager = new ServerStatisticManager(this.server, file1);
|
||||
|
@ -739,7 +740,7 @@
|
|||
}
|
||||
|
||||
return serverstatisticmanager;
|
||||
@@ -866,14 +1177,14 @@
|
||||
@@ -866,14 +1178,14 @@
|
||||
|
||||
public AdvancementDataPlayer f(EntityPlayer entityplayer) {
|
||||
UUID uuid = entityplayer.getUniqueID();
|
||||
|
@ -756,7 +757,7 @@
|
|||
}
|
||||
|
||||
advancementdataplayer.a(entityplayer);
|
||||
@@ -909,13 +1220,20 @@
|
||||
@@ -909,13 +1221,20 @@
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
|
|
Loading…
Reference in a new issue