Improve support for per-world game rules
By: md_5 <git@md-5.net>
This commit is contained in:
parent
497c50463c
commit
c434d05d57
4 changed files with 161 additions and 13 deletions
|
@ -1246,7 +1246,7 @@
|
|||
}
|
||||
} else {
|
||||
PlayerConnection.this.disconnect(IChatBaseComponent.translatable("multiplayer.disconnect.invalid_entity_attacked"));
|
||||
@@ -1630,14 +2352,14 @@
|
||||
@@ -1630,17 +2352,17 @@
|
||||
case PERFORM_RESPAWN:
|
||||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
|
@ -1262,7 +1262,11 @@
|
|||
+ this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
||||
if (this.server.isHardcore()) {
|
||||
this.player.setGameMode(EnumGamemode.SPECTATOR);
|
||||
((GameRules.GameRuleBoolean) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
- ((GameRules.GameRuleBoolean) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
+ ((GameRules.GameRuleBoolean) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // CraftBukkit - per-world
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1653,15 +2375,21 @@
|
||||
@Override
|
||||
public void handleContainerClose(PacketPlayInCloseWindow packetplayinclosewindow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue