2024-10-22T16:13:23Z Command used by server console: stop
2024-10-22T16:13:23Z 正在关闭服务器...
2024-10-22T16:13:23Z 命令发生错误:
java.lang.NullPointerException: Cannot invoke "emu.grasscutter.server.game.GameServer.getPlayers()" because the return value of "emu.grasscutter.Grasscutter.getGameServer()" is null
at emu.grasscutter.command.commands.StopCommand.execute(StopCommand.java:20)
at emu.grasscutter.command.CommandMap.lambda$invoke$0(CommandMap.java:331)
at emu.grasscutter.command.CommandMap.invoke(CommandMap.java:335)
at emu.grasscutter.Grasscutter.startConsole(Grasscutter.java:351)
at emu.grasscutter.Grasscutter.main(Grasscutter.java:187)
Possible cause:
The server needs to kick out all players when it is shut down, so it needs to retrieve a list of players. However, on a server with DISPATCH_ONLY, the game service has never been started, so there is no player list. Therefore, a null pointer error occurs when trying to retrieve it.
Logs:
2024-10-22T16:13:23Z Command used by server console: stop
2024-10-22T16:13:23Z 正在关闭服务器...
2024-10-22T16:13:23Z 命令发生错误:
java.lang.NullPointerException: Cannot invoke "emu.grasscutter.server.game.GameServer.getPlayers()" because the return value of "emu.grasscutter.Grasscutter.getGameServer()" is null
at emu.grasscutter.command.commands.StopCommand.execute(StopCommand.java:20)
at emu.grasscutter.command.CommandMap.lambda$invoke$0(CommandMap.java:331)
at emu.grasscutter.command.CommandMap.invoke(CommandMap.java:335)
at emu.grasscutter.Grasscutter.startConsole(Grasscutter.java:351)
at emu.grasscutter.Grasscutter.main(Grasscutter.java:187)
Possible cause:
The server needs to kick out all players when it is shut down, so it needs to retrieve a list of players. However, on a server with DISPATCH_ONLY, the game service has never been started, so there is no player list. Therefore, a null pointer error occurs when trying to retrieve it.
Screenshot: