- Fix an incorrect import for
semver
- Allow discovering the server management protocol version via
connection.discover() - Log errors if no error handler is registered
- Log warnings if an unsupported server management protocol version is detected
- WebSocketConnection now forwards the
max_reconnects_reachedevent - This library can now be used in a browser environment. The WebSocketConnection import now automatically refers to the correct implementation based on the environment (Node.js or browser) and authenticates with the Minecraft server accordingly.
- Gamerules are now stored in registries. This means that all gamerule names have been changed. You can find the new
names here.
server.hasGameRulesRegistry()can be used to determine whether the server uses the old or the new names.
WebSocketConnection.connect()now respects your reconnect settings for the initial connection attempt instead of always rejecting if the initial connection fails, but attempting to reconnect anyways.
- Add
SERVER_ACTIVITYnotification
- Errors returned by the server are now correctly converted to JsonRPCError objects.
Connection#callRawnow returns an object with a success boolean and either a data field (if successful) or an error field (if failed).
- Improve JsonRPCError message formatting
- Removed support for servers older than 1.21.9-pre4
- Remove fallback for old notification namespace used before 1.21.9-pre1.
- If you are using literal strings to subscribe to notifications, please check they all start with
minecraft:notification/. - If you are using the
Notificationsenum, no changes are needed.
- If you are using literal strings to subscribe to notifications, please check they all start with
- Export JsonRPCErrorCode enum