Package net.kyori.adventure.chat
Interface SignedMessage
-
- All Superinterfaces:
net.kyori.examination.Examinable
,Identified
@NonExtendable public interface SignedMessage extends Identified, net.kyori.examination.Examinable
A signed chat message.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SignedMessage.Signature
A signature wrapper type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
canDelete()
Checks if this message can be deleted viaAudience.deleteMessage(SignedMessage)
.default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty>
examinableProperties()
default boolean
isSystem()
Checks if this message is a system message.@NotNull java.lang.String
message()
The plain string message.long
salt()
The salt.@Nullable SignedMessage.Signature
signature()
The signature of the message.static @NotNull SignedMessage.Signature
signature(byte[] signature)
Creates a signature wrapper.static @NotNull SignedMessage
system(@NotNull java.lang.String message, @Nullable ComponentLike unsignedContent)
Creates a systemSignedMessage
.@NotNull java.time.Instant
timestamp()
The time that the message was sent.@Nullable Component
unsignedContent()
The unsigned component content.-
Methods inherited from interface net.kyori.adventure.identity.Identified
identity
-
-
-
-
Method Detail
-
signature
@Contract(value="_ -> new", pure=true) @NotNull static @NotNull SignedMessage.Signature signature(byte[] signature)
Creates a signature wrapper.- Parameters:
signature
- the signature- Returns:
- a new signature
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
system
@Contract(value="_, _ -> new", pure=true) @NotNull static @NotNull SignedMessage system(@NotNull @NotNull java.lang.String message, @Nullable @Nullable ComponentLike unsignedContent)
Creates a systemSignedMessage
.- Parameters:
message
- the messageunsignedContent
- the optional unsigned component content- Returns:
- a new system
SignedMessage
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
timestamp
@Contract(pure=true) @NotNull @NotNull java.time.Instant timestamp()
The time that the message was sent.- Returns:
- the timestamp
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
salt
@Contract(pure=true) long salt()
The salt.- Returns:
- the salt
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
signature
@Contract(pure=true) @Nullable @Nullable SignedMessage.Signature signature()
The signature of the message.- Returns:
- the signature
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
unsignedContent
@Contract(pure=true) @Nullable @Nullable Component unsignedContent()
The unsigned component content.- Returns:
- the component or null
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
message
@Contract(pure=true) @NotNull @NotNull java.lang.String message()
The plain string message.- Returns:
- the plain string message
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
isSystem
@Contract(pure=true) default boolean isSystem()
Checks if this message is a system message.- Returns:
- true if system
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
canDelete
@Contract(pure=true) default boolean canDelete()
Checks if this message can be deleted viaAudience.deleteMessage(SignedMessage)
.- Returns:
- true if supports deletion
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
examinableProperties
@NotNull default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
- Specified by:
examinableProperties
in interfacenet.kyori.examination.Examinable
-
-