public static final class PlayerChatEvent.ChatResult extends Object implements ResultedEvent.Result
PlayerChatEvent
.Modifier and Type | Method and Description |
---|---|
static PlayerChatEvent.ChatResult |
allowed()
Allows the message to be sent, without modification.
|
static PlayerChatEvent.ChatResult |
denied()
Prevents the message from being sent.
|
Optional<String> |
getMessage() |
boolean |
isAllowed()
Returns whether or not the event is allowed to proceed.
|
static PlayerChatEvent.ChatResult |
message(@NonNull String message)
Allows the message to be sent, but silently replaced with another.
|
String |
toString() |
public boolean isAllowed()
ResultedEvent.Result
isAllowed
in interface ResultedEvent.Result
public static PlayerChatEvent.ChatResult allowed()
public static PlayerChatEvent.ChatResult denied()
public static PlayerChatEvent.ChatResult message(@NonNull String message)
message
- the message to use instead