JoinServer
com.jsmacrosce.jsmacros.client.api.event.impl.world.EventJoinServer
Fires after the login packet is handled and the local player exists; the world may still be loading.
js
JsMacros.on("JoinServer", JavaWrapper.methodToJava(function (event) {
Chat.log(`Joined ${event.address} as ${event.player.getName().getString()}`);
}))Constructors
new EventJoinServer
new EventJoinServer(LocalPlayer player, String address)#Initializes this event with the supplied player and connection address. The player is stored in a ClientPlayerEntityHelper wrapper, including when
player is null; the address is stored unchanged. This constructor does not perform connection setup or dispatch the event.Parameters:
player: the local player to wrap;nullis retained by the wrapperaddress: the supplied connection address, stored unchanged and possiblynull
Fields
address
player
Local player for this connection.
Methods
toString
Returns a diagnostic string containing the event name and address. The address is interpolated as a quoted string without escaping; a
null address therefore appears as the text "null". This is not a JSON serializer.Returns: the event name followed by
:{"address": "..."}, with the supplied address inserted between the quotes