# 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 {#com.jsmacrosce.jsmacros.core.event.Event_cancellable-}

```js
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 cancellable

### filterer {#com.jsmacrosce.jsmacros.core.event.Event_filterer-}

```js
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 declared

### joinable {#com.jsmacrosce.jsmacros.core.event.Event_joinable-}

```js
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

### oldName {#com.jsmacrosce.jsmacros.core.event.Event_oldName-}

```js
oldName(): String
```

Returns an explicitly declared legacy alias; the registry also records the annotated
 class's simple name as an alias.

**Returns:** the old-name alias, or an empty string if none was declared

### value {#com.jsmacrosce.jsmacros.core.event.Event_value-}

```js
value(): String
```

Returns the declared current event name used during registration.

**Returns:** the declared event name
