Minecraft Java Edition 1.21.9

In a recent update, the Minecraft Server Management Protocol has introduced a server management API utilizing JSON-RPC over WebSocket for dedicated servers. This API is initially disabled but can be activated through the <span class="MCEffectTextHighlightA”>server.properties file by setting the following parameters:

  • <span class="MCEffectTextHighlightA”>management-server-enabled=true
  • <span class="MCEffectTextHighlightA”>management-server-host=localhost
  • <span class="MCEffectTextHighlightA”>management-server-port=0

Once enabled, the API can be accessed at <span class="MCEffectTextHighlightA”>ws://:. It allows for querying and updating server states, including player information, allowlists, operators, settings, and game rules. Notifications regarding state changes, such as player joins and game rule updates, are also sent through this API. A call to <span class="MCEffectTextHighlightA”>{“id”:1,”method”:”rpc.discover”} will return an API schema detailing the supported methods and notifications of the active server.

The Data Generator will produce an API schema file named <span class="MCEffectTextHighlightA”>json-rpc-api-schema.json within the reports output folder, reflecting the contents returned by the <span class="MCEffectTextHighlightA”>rpc.discover method. This API adheres to the JSON-RPC 2.0 specification and employs namespaced methods, with reserved namespaces such as <span class="MCEffectTextHighlightA”>minecraft (e.g., <span class="MCEffectTextHighlightA”>minecraft:players, <span class="MCEffectTextHighlightA”>minecraft:allowlist/add), allowing for extensibility through custom namespaces for additional methods and events.

Core method groups include players, allowlist, operators, server commands (save, stop), server settings, and game rules. For instance, an example method call could look like this:

  • Request: <span class="MCEffectTextHighlightA”>{“method”:”minecraft:allowlist/add”,”id”:1,”params”:[[{“name”:”jeb_”}]]}
  • Response: <span class="MCEffectTextHighlightA”>{“jsonrpc”:”2.0″,”id”:1,”result”:[{“id”:”853c80ef-3c37-49fd-aa49-938b674adae6″,”name”:”jeb_”}]}

Notifications and error responses are also structured according to the JSON-RPC 2.0 error object format, ensuring consistency and clarity in communication. Clients must authenticate to access the API by providing an <span class="MCEffectTextHighlightA”>Authorization bearer token header with a server-specific secret, which can be configured in the <span class="MCEffectTextHighlightA”>server.properties file. The secret must consist of exactly 40 alphanumeric characters and will be auto-generated if left empty. Unauthorized requests will receive a 401 Unauthorized response.

By default, TLS is enabled for secure communication, though it can be disabled in the <span class="MCEffectTextHighlightA”>server.properties file. A keystore file must be specified for TLS to function, and the password can be set through various methods, including environment variables or server properties. Failure to provide a keystore when TLS is enabled will prevent the server from starting.

Chat Drafts

In an effort to enhance user experience, unsent chat messages will now be saved as Chat Drafts if the chat is closed unexpectedly, such as when a player dies or a dialog box opens. However, if a player intentionally closes the chat, the message will not be saved. When the chat is reopened, any existing drafts will be pre-filled in the message box, appearing grayed out until fully restored. Players can restore draft text by typing, moving the cursor, clicking, or highlighting the text. Sending a draft message before restoration will transmit it as a normal chat message, while pressing backspace will delete it.

Additionally, a new option in the Chat Settings screen allows players to save unsent messages by default, ensuring that drafts are always retained, even if the chat is intentionally closed.

Server Code of Conduct

To foster a respectful gaming environment, a Code of Conduct screen will now appear upon connecting to a server. Acceptance of this Code is mandatory for gameplay, with an option to not display it again unless it changes. A new boolean field, <span class="MCEffectTextHighlightA”>enable-code-of-conduct, has been added to the <span class="MCEffectTextHighlightA”>server.properties file. Setting this to <span class="MCEffectTextHighlightA”>true prompts the server to search for Code of Conduct files in the <span class="MCEffectTextHighlightA”>codeofconduct subfolder. Each file should be named in the format <span class="MCEffectTextHighlightA”><languagecode>.txt</languagecode> and encoded in UTF-8.

Accessibility Enhancements

In a bid to improve accessibility, several features have been introduced. Key binds for “Attack/Destroy” and “Use Item/Place Block” are now toggleable, allowing players to choose between “Hold” or “Toggle” modes. An “Invert Mouse X” option has been added to the Mouse Settings screen, and a “Sprint Window” option defines the time window for double-tapping the forward key to activate sprinting. Furthermore, multiple key binds can now coexist, enabling players to bind the same key to different actions without conflict.

Additionally, the spectator hotbar menu key can now be rebound, and some sound sliders in the Music & Sound Options will play a preview sound when adjusted outside of a world. These enhancements aim to create a more inclusive gaming experience for all players.

Performance Improvements

Recent updates have also focused on performance enhancements. The rendering order for entities has been optimized, resulting in smoother gameplay, particularly in areas with high mob density. Particles outside the player’s view will no longer be rendered, further contributing to performance improvements. The loading mechanics have been refined, ensuring that chunks are fully loaded before player entry or server startup, thereby streamlining the overall experience.

With these updates, Minecraft continues to evolve, offering players a more robust and enjoyable gaming environment. The introduction of the Server Management Protocol, enhanced chat functionality, and improved accessibility features reflect a commitment to innovation and user satisfaction.

AppWizard
Minecraft Java Edition 1.21.9