Interface SignedMessage
- All Superinterfaces:
Identified
A signed chat message.
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA signature wrapper type. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks if this message can be deleted viaAudience.deleteMessage(SignedMessage).default booleanisSystem()Checks if this message is a system message.message()The plain string message.longsalt()The salt.@Nullable SignedMessage.SignatureThe signature of the message.static SignedMessage.Signaturesignature(byte[] signature) Creates a signature wrapper.static SignedMessagesystem(String message, @Nullable ComponentLike unsignedContent) Creates a systemSignedMessage.The time that the message was sent.@Nullable ComponentThe unsigned component content.Methods inherited from interface Identified
identity
-
Method Details
-
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) static SignedMessage system(String message, @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
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
The signature of the message.- Returns:
- the signature
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
unsignedContent
The unsigned component content.- Returns:
- the component or null
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
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
-