steves-underwater-paradise / restart-server

Minecraft Fabric mod that adds a restart command to dedicated servers.
https://www.curseforge.com/minecraft/mc-mods/restart-server
GNU Lesser General Public License v2.1
6 stars 2 forks source link

/restart only works from console, and if any players are on, the server will "gracefully" crash. #25

Closed progenitor-amborella closed 6 months ago

progenitor-amborella commented 6 months ago

In 1.20.4 I am able to use the mod, but restarting only works from the console when no players are online. If any player is on it will stop, but then crash. Additionally, issuing /restart from the game doesn't have an effect. It will print in console, but nothing actually happens, which is shown here, followed by a console-issued restart.

[22:44:03] [Server thread/INFO]: [Restart Server] Restarting server...
[22:44:12] [Server thread/INFO]: [Restart Server] Restarting server...
[22:44:12] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoSuchMethodError: 'void net.minecraft.server.network.ServerPlayNetworkHandler.method_14367(net.minecraft.text.Text)'
    at io.github.steveplays28.restartserver.commands.RestartCommand.lambda$execute$2(RestartCommand.java:28) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
    at java.util.ArrayList.forEach(Unknown Source) ~[?:?]
    at io.github.steveplays28.restartserver.commands.RestartCommand.execute(RestartCommand.java:28) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
    at io.github.steveplays28.restartserver.commands.RestartCommand.lambda$register$0(RestartCommand.java:20) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
    at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
    at net.minecraft.command.FixedCommandAction.execute(FixedCommandAction.java:29) ~[server-intermediary.jar:?]
    at net.minecraft.command.FixedCommandAction.execute(FixedCommandAction.java:13) ~[server-intermediary.jar:?]
    at net.minecraft.command.SourcedCommandAction.method_54405(SourcedCommandAction.java:8) ~[server-intermediary.jar:?]
    at net.minecraft.command.CommandQueueEntry.execute(CommandQueueEntry.java:8) ~[server-intermediary.jar:?]
    at net.minecraft.command.CommandExecutionContext.run(CommandExecutionContext.java:107) ~[server-intermediary.jar:?]
    at net.minecraft.server.command.CommandManager.callWithContext(CommandManager.java:378) ~[server-intermediary.jar:?]
    at net.minecraft.server.command.CommandManager.execute(CommandManager.java:308) ~[server-intermediary.jar:?]
    at net.minecraft.server.command.CommandManager.executeWithPrefix(CommandManager.java:298) ~[server-intermediary.jar:?]
    at net.minecraft.server.dedicated.MinecraftDedicatedServer.executeQueuedCommands(MinecraftDedicatedServer.java:299) ~[server-intermediary.jar:?]
    at net.minecraft.server.dedicated.MinecraftDedicatedServer.tickWorlds(MinecraftDedicatedServer.java:284) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:845) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:683) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
    at java.lang.Thread.run(Unknown Source) ~[?:?]
[22:44:12] [Server thread/ERROR]: This crash report has been saved to: C:\Users\userpathhere
[22:44:12] [Server thread/INFO]: BlueMap unloaded!
[22:44:12] [Server thread/INFO]: Safely shutdown!
[22:44:12] [Server thread/INFO]: Shutting down Geyser.
[22:44:13] [Server thread/INFO]: Geyser shutdown successfully.
[22:44:13] [WebSocketConnectReadThread-95/INFO]: The skin uploader has been closed
[22:44:15] [Server thread/INFO]: Stopping server
[22:44:15] [Server thread/INFO]: Saving players
[22:44:15] [Server thread/INFO]: foobar lost connection: Server closed
[22:44:15] [Server thread/INFO]: foobar left the game
[22:44:15] [Server thread/INFO]: Saving worlds
[22:44:15] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Build Test]'/minecraft:overworld
[22:44:15] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Build Test]'/minecraft:the_end
[22:44:15] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Build Test]'/minecraft:the_nether
[22:44:15] [Server thread/INFO]: ThreadedAnvilChunkStorage (superflat): All chunks are saved
[22:44:15] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[22:44:15] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[22:44:15] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[22:45:15] [Server Watchdog/ERROR]: A single server tick took 60.00 seconds (should be max 0.05)
[22:45:15] [Server Watchdog/ERROR]: Considering it to be crashed, server will forcibly shutdown.
[22:45:15] [Server Watchdog/ERROR]: This crash report has been saved to: C:\Users\userpathhere
Steveplays28 commented 6 months ago

Duplicate of #24, thanks for the log, and thanks for checking out Restart Server though

progenitor-amborella commented 6 months ago

I initially was going to comment this on issue #24, but was not sure given the nature of the crash if it should be separate. Thank you!