Class SpeechEvent
java.lang.Object
org.bukkit.event.Event
net.citizensnpcs.api.ai.speech.event.SpeechEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
SpeechBystanderEvent,SpeechTargetedEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theSpeechContextassociated with the SpeechEvent.static HandlerListThe final message to be sent to the bystander.booleanvoidsetCancelled(boolean cancelled) voidsetMessage(String formattedMessage) Sets the message to be sent to the bystander.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SpeechEvent
-
-
Method Details
-
getContext
Gets theSpeechContextassociated with the SpeechEvent.- Returns:
- the SpeechContext
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getMessage
The final message to be sent to the bystander. Note: This may differ from the message contained in the SpeechContext, as formatting may have occurred.- Returns:
- the message to be sent to the
Talkablebystander.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-
setMessage
Sets the message to be sent to the bystander. Note: This may differ from the message contained in the SpeechContext, as formatting may have occurred. -
getHandlerList
-