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
-
Method Summary
Modifier and TypeMethodDescriptionGets theSpeechContext
associated with the SpeechEvent.static HandlerList
The final message to be sent to the bystander.boolean
void
setCancelled
(boolean cancelled) void
setMessage
(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 theSpeechContext
associated with the SpeechEvent.- Returns:
- the SpeechContext
-
getHandlers
- Specified by:
getHandlers
in 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
Talkable
bystander.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in 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
-