DimensionChange
com.jsmacrosce.jsmacros.client.api.event.impl.world.EventDimensionChange
Fires when the client begins setting a non-null world, such as when joining or changing dimensions. It does not fire when leaving a world; use Disconnect instead.
js
JsMacros.on("DimensionChange", JavaWrapper.methodToJava(function (event) {
Chat.log(`Dimension changed to ${event.dimension}`);
}))Constructors
new EventDimensionChange
Fields
dimension
Methods
toString
Returns a diagnostic representation containing the event name and stored dimension label. The label is quoted but not escaped, so this is not guaranteed to be valid JSON; a null label appears as the quoted text
"null".Returns: the event name followed by
:{"dimension": "label"}, with the stored label substituted verbatim