9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/divinemc-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch
NONPLAYT 9e496185fa Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@c8a4f0b6 Updated Upstream (Paper)
PurpurMC/Purpur@e8fe8ece forgot to commit this
PurpurMC/Purpur@45bc9f41 Updated Upstream (Paper)
2025-10-18 05:22:26 +03:00

25 lines
1.5 KiB
Diff

--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1005,6 +_,13 @@
if (this.hasStopped) return;
this.hasStopped = true;
}
+ // DivineMC start - Respawn players that were dead on server restart
+ for (ServerPlayer player : this.playerList.players) {
+ if (player.isDeadOrDying() || (player.isRemoved() && player.getRemovalReason() == net.minecraft.world.entity.Entity.RemovalReason.KILLED)) {
+ this.playerList.respawn(player, false, net.minecraft.world.entity.Entity.RemovalReason.KILLED, org.bukkit.event.player.PlayerRespawnEvent.RespawnReason.DEATH);
+ }
+ }
+ // DivineMC end - Respawn players that were dead on server restart
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support
org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support
@@ -1097,6 +_,7 @@
// Paper end - rewrite chunk system
// Paper start - Improved watchdog support - move final shutdown items here
Util.shutdownExecutors();
+ org.bxteam.divinemc.async.ExecutorShutdown.shutdown(this); // DivineMC - Shutdown executors
try {
net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
} catch (final Exception ignored) {