Class ClientEmoteEvent
java.lang.Object
org.geysermc.geyser.api.event.connection.ConnectionEvent
org.geysermc.geyser.api.event.bedrock.ClientEmoteEvent
- All Implemented Interfaces:
org.geysermc.event.Cancellable,org.geysermc.event.Event
public final class ClientEmoteEvent
extends ConnectionEvent
implements org.geysermc.event.Cancellable
Called whenever a Bedrock player performs an emote on their end, before it is broadcasted to the rest of the server.
- Since:
- 2.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemoteId()The emote ID that the Bedrock player is attempting to perform.booleanWhether this event is cancelled.voidsetCancelled(boolean cancelled) Sets the cancel status of this event.booleansilent()Whether the emote should be played silently, or announced in the server chatvoidsilent(boolean silent) Whether the emote should be played silently, or announced in the server chatMethods inherited from class org.geysermc.geyser.api.event.connection.ConnectionEvent
connection
-
Constructor Details
-
ClientEmoteEvent
-
-
Method Details
-
emoteId
The emote ID that the Bedrock player is attempting to perform. It is sent directly by the client, and is not guaranteed to be a valid emote ID.- Returns:
- the emote ID requested by the player
- Since:
- 2.1.0
-
silent
public boolean silent()Whether the emote should be played silently, or announced in the server chat- Returns:
- whether the emote should be played silently
- Since:
- 2.9.6
-
silent
public void silent(boolean silent) Whether the emote should be played silently, or announced in the server chat- Parameters:
silent- if true, the emote will not be announced in the server chat- Since:
- 2.9.6
- See Also:
-
isCancelled
public boolean isCancelled()Whether this event is cancelled. A Bedrock player will still play this emote on its end even if this event is cancelled, but other Bedrock players will not see.- Specified by:
isCancelledin interfaceorg.geysermc.event.Cancellable- Returns:
- the cancel status of this event
- Since:
- 2.1.0
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancel status of this event. If this event is canceled, the emote will not be played to other players.- Specified by:
setCancelledin interfaceorg.geysermc.event.Cancellable- Parameters:
cancelled- whether this event is cancelled- Since:
- 2.1.0
-