Event
com.jsmacrosce.jsmacros.core.event.Event
Declares an event type's registry metadata: its current name, aliases, dispatch flags, and optional filterer class. This describes the annotated runtime class, not an event instance.
js
const Event = Java.type("com.jsmacrosce.jsmacros.core.event.Event");
const Tick = Java.type("com.jsmacrosce.jsmacros.client.api.event.impl.world.EventTick");
const metadata = Tick.class.getAnnotation(Event.class);
Chat.log(metadata.value() + " (old name: " + metadata.oldName() + ")");Methods
cancellable
cancellable(): boolean#Declares the event's cancellable metadata flag. Defaults to
false. Registration also marks such an event joinable; subclasses may define effective cancellability independently.Returns:
true if the event is declared cancellablefilterer
filterer(): Class<? extends EventFilterer>#Declares the filterer class to register for this event, if any.
Returns: the filterer class, or
EventFilterer.class when none is declaredjoinable
joinable(): boolean#Declares whether the event is joinable; defaults to
false. Cancellable events are treated as joinable too.Returns:
true if the event is declared joinable