EventSelector

@API(status = API.Status.EXPERIMENTAL, since = "1.0.0")
enum EventSelector : Enum<EventSelector>

Entries

Link copied to clipboard

Selects the entity from an EntityEvent.

Link copied to clipboard

Selects the player from a PlayerEvent.

Link copied to clipboard

Selects the killer from an EntityDeathEvent.

Link copied to clipboard

Selects the target from an EntityTargetLivingEntityEvent.

Link copied to clipboard

Selects the shooter from any EntityEvent where the entity is a Projectile.

Link copied to clipboard

Selects the damager from an EntityDamageByEntityEvent.

Types

Link copied to clipboard
class OriginSelector<E : Event>(val eventType: KClass<E>, val selector: E.() -> Origin?) : EventSelector.TargetSelector<E, Either<Nothing, Origin?>>
Link copied to clipboard
class PlayerSelector<E : Event>(val eventType: KClass<E>, val selector: E.() -> Player?) : EventSelector.TargetSelector<E, Either<Player?, Nothing>>
Link copied to clipboard
interface TargetSelector<E : Event, R : Either<Player?, Origin?>>

Functions

Link copied to clipboard
operator fun invoke(event: Event): Either<Player?, Origin?>
Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard