3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

SPIGOT-4562: reducedDebugInfo not updated on world change

Dieser Commit ist enthalten in:
md_5 2019-01-02 10:57:47 +11:00
Ursprung c4a67eed99
Commit a83828623b

Datei anzeigen

@ -857,7 +857,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE)); entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE));
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle"))); entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle")));
@@ -748,16 +1194,21 @@ @@ -748,17 +1194,26 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
if (worldserver.isRaining()) { if (worldserver.isRaining()) {
@ -881,9 +881,14 @@
+ // entityplayer.triggerHealthUpdate(); + // entityplayer.triggerHealthUpdate();
+ entityplayer.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange + entityplayer.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange
entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
+ // CraftBukkit start - from GameRules
+ int i = entityplayer.world.getGameRules().get("reducedDebugInfo").b() ? 22 : 23;
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) i));
+ // CraftBukkit end
} }
@@ -819,26 +1270,39 @@ public int getPlayerCount() {
@@ -819,26 +1274,39 @@
} }
public void u() { public void u() {
@ -928,7 +933,7 @@
if (serverstatisticmanager == null) { if (serverstatisticmanager == null) {
File file = new File(this.server.getWorldServer(DimensionManager.OVERWORLD).getDataManager().getDirectory(), "stats"); File file = new File(this.server.getWorldServer(DimensionManager.OVERWORLD).getDataManager().getDirectory(), "stats");
@@ -853,7 +1317,7 @@ @@ -853,7 +1321,7 @@
} }
serverstatisticmanager = new ServerStatisticManager(this.server, file1); serverstatisticmanager = new ServerStatisticManager(this.server, file1);
@ -937,7 +942,7 @@
} }
return serverstatisticmanager; return serverstatisticmanager;
@@ -861,14 +1325,14 @@ @@ -861,14 +1329,14 @@
public AdvancementDataPlayer h(EntityPlayer entityplayer) { public AdvancementDataPlayer h(EntityPlayer entityplayer) {
UUID uuid = entityplayer.getUniqueID(); UUID uuid = entityplayer.getUniqueID();
@ -954,7 +959,7 @@
} }
advancementdataplayer.a(entityplayer); advancementdataplayer.a(entityplayer);
@@ -904,13 +1368,20 @@ @@ -904,13 +1372,20 @@
} }
public void reload() { public void reload() {