Player.Events


public final class Player.Events


A set of events.

Summary

Public constructors

Creates an instance.

Public methods

boolean
contains(@Player.Event int event)

Returns whether the given Event occurred.

boolean
containsAny(@Player.Event int[] events)

Returns whether any of the given events occurred.

boolean
int
@Player.Event
get(int index)

Returns the Event at the given index.

int
int

Returns the number of events in the set.

Public constructors

Events

@UnstableApi
public Events(FlagSet flags)

Creates an instance.

Parameters
FlagSet flags

The FlagSet containing the events.

Public methods

contains

public boolean contains(@Player.Event int event)

Returns whether the given Event occurred.

Parameters
@Player.Event int event

The Event.

Returns
boolean

Whether the Event occurred.

containsAny

public boolean containsAny(@Player.Event int[] events)

Returns whether any of the given events occurred.

Parameters
@Player.Event int[] events

The events.

Returns
boolean

Whether any of the events occurred.

equals

public boolean equals(@Nullable Object obj)

get

@Player.Event
public int get(int index)

Returns the Event at the given index.

Although index-based access is possible, it doesn't imply a particular order of these events.

Parameters
int index

The index. Must be between 0 (inclusive) and size (exclusive).

Returns
int

The Event at the given index.

Throws
java.lang.IndexOutOfBoundsException

If index is outside the allowed range.

hashCode

public int hashCode()

size

public int size()

Returns the number of events in the set.