Interface VanishMessageContext
- All Superinterfaces:
MessageContext
- All Known Subinterfaces:
AFKMessageContext, JoinMessageContext, VanillaMessageContext
A message context that also records whether the sender is hidden, so join and quit
messages can be faked or suppressed for vanished players.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageContext
MessageContext.CacheKey -
Method Summary
Modifier and TypeMethodDescriptionstatic net.flectone.pulse.model.event.message.context.VanishMessageContextImpl.VanishMessageContextImplBuilderbuilder()Starts building this context.booleanWhether this message is a stand-in produced by vanishing rather than a real event.booleanvanished()Whether the sender is currently hidden.withFakeMessage(boolean fakeMessage) Returns a copy with the faked flag set.withVanished(boolean vanished) Returns a copy with the vanished flag set.Methods inherited from interface MessageContext
addFlag, addFlags, addTagResolver, addTagResolvers, base, createCacheKey, flags, isFlag, message, receiver, sender, tagResolver, toBuilder, uuid, withBase, withFlags, withMessage, withReceiver, withSender, withTagResolver, withUuid
-
Method Details
-
builder
static net.flectone.pulse.model.event.message.context.VanishMessageContextImpl.VanishMessageContextImplBuilder builder()Starts building this context.- Returns:
- a new builder
-
fakeMessage
boolean fakeMessage()Whether this message is a stand-in produced by vanishing rather than a real event.- Returns:
- true if the message is faked
-
vanished
boolean vanished()Whether the sender is currently hidden.- Returns:
- true if the sender is vanished
-
withFakeMessage
Returns a copy with the faked flag set.- Parameters:
fakeMessage- the new state- Returns:
- the copy
-
withVanished
Returns a copy with the vanished flag set.- Parameters:
vanished- the new state- Returns:
- the copy
-