mojira.dev
MC-305939

Unexpected error when trying to run commands immediately after the server starts

If you try to run command when the server start exists a period where any command (help, list, whitelist) just throw “An unexpected error occurred trying to execute that command” with the flag VERBOSE_COMMAND_ERRORS looks like the issue is a check for gamerules when the ServerLevel can be null on start.

Steps

  1. Start the server

  2. When show “Starting net.minecraft.server.Main” just try any command (help, list)

Expected Behaviour

The server run the command

Current Behaviour

The server throw an error with not details

Attachments

Comments 2

Please log into the game and run these commands, and see if an error occurs there. Please attach the server log which shows these errors.

In the game this not happen because the server was already started.
I include server logs with the last snapshot (for the unobfuscated stacktrace) where show the issue.

[media]

Doc

(Unassigned)

Confirmed

Platform

Low

Commands, Dedicated Server

1.21.11, 26.1 Snapshot 4

Retrieved