mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 09:51:12 +01:00
SPIGOT-5727: GameRule doImmediateRespawn cannot be set per-world
This commit is contained in:
parent
933e9094bf
commit
214ffea95e
1 changed files with 7 additions and 5 deletions
|
@ -627,7 +627,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(GameRules.DO_DAYLIGHT_CYCLE)));
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)));
|
||||||
@@ -643,17 +917,26 @@
|
@@ -643,17 +917,28 @@
|
||||||
|
|
||||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
|
||||||
if (worldserver.isRaining()) {
|
if (worldserver.isRaining()) {
|
||||||
|
@ -654,11 +654,13 @@
|
||||||
+ // CraftBukkit start - from GameRules
|
+ // CraftBukkit start - from GameRules
|
||||||
+ int i = entityplayer.world.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23;
|
+ int i = entityplayer.world.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23;
|
||||||
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) i));
|
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) i));
|
||||||
|
+ float immediateRespawn = entityplayer.world.getGameRules().getBoolean(GameRules.DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F;
|
||||||
|
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(11, immediateRespawn));
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPlayerCount() {
|
public int getPlayerCount() {
|
||||||
@@ -710,33 +993,52 @@
|
@@ -710,33 +995,52 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
|
@ -718,7 +720,7 @@
|
||||||
|
|
||||||
if (file2.exists() && file2.isFile()) {
|
if (file2.exists() && file2.isFile()) {
|
||||||
file2.renameTo(file1);
|
file2.renameTo(file1);
|
||||||
@@ -744,7 +1046,7 @@
|
@@ -744,7 +1048,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
serverstatisticmanager = new ServerStatisticManager(this.server, file1);
|
serverstatisticmanager = new ServerStatisticManager(this.server, file1);
|
||||||
|
@ -727,7 +729,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return serverstatisticmanager;
|
return serverstatisticmanager;
|
||||||
@@ -752,14 +1054,14 @@
|
@@ -752,14 +1056,14 @@
|
||||||
|
|
||||||
public AdvancementDataPlayer f(EntityPlayer entityplayer) {
|
public AdvancementDataPlayer f(EntityPlayer entityplayer) {
|
||||||
UUID uuid = entityplayer.getUniqueID();
|
UUID uuid = entityplayer.getUniqueID();
|
||||||
|
@ -744,7 +746,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
advancementdataplayer.a(entityplayer);
|
advancementdataplayer.a(entityplayer);
|
||||||
@@ -795,13 +1097,20 @@
|
@@ -795,13 +1099,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reload() {
|
public void reload() {
|
||||||
|
|
Loading…
Reference in a new issue