2020-02-02 12:22:46 -05:00
|
|
|
CLASS net/minecraft/class_2797 net/minecraft/network/packet/c2s/play/ChatMessageC2SPacket
|
2021-11-24 15:16:37 -05:00
|
|
|
COMMENT A packet used to send a chat message to the server.
|
|
|
|
COMMENT
|
2022-05-12 09:36:43 -04:00
|
|
|
COMMENT <p>This truncates the message to at most 256 characters before sending to
|
|
|
|
COMMENT the server on the client. If the server receives the message longer than
|
|
|
|
COMMENT 256 characters, it will reject the message and disconnect the client.
|
2021-11-24 15:16:37 -05:00
|
|
|
COMMENT
|
|
|
|
COMMENT <p>If the message contains an invalid character (see {@link
|
2022-07-06 07:57:17 -04:00
|
|
|
COMMENT net.minecraft.SharedConstants#isValidChar isValidChar}) or if the server
|
|
|
|
COMMENT receives the messages in improper order. the server will
|
2021-11-24 15:16:37 -05:00
|
|
|
COMMENT reject the message and disconnect the client.
|
|
|
|
COMMENT
|
2022-07-06 07:57:17 -04:00
|
|
|
COMMENT <p>Messages that took more than {@link SignedMessage#SERVERBOUND_TIME_TO_LIVE}
|
|
|
|
COMMENT to reach the server are considered expired and log warnings on the server.
|
|
|
|
COMMENT If the message takes more than {@link SignedMessage#CLIENTBOUND_TIME_TO_LIVE}
|
|
|
|
COMMENT to reach the clients (including the time it took to reach the server), the
|
|
|
|
COMMENT message is not considered secure anymore by the clients, and may be discarded
|
|
|
|
COMMENT depending on the clients' options.
|
2022-05-02 08:57:32 -04:00
|
|
|
COMMENT
|
2021-11-24 15:16:37 -05:00
|
|
|
COMMENT @see net.minecraft.client.network.ClientPlayerEntity#sendChatMessage
|
|
|
|
COMMENT @see net.minecraft.server.network.ServerPlayNetworkHandler#onChatMessage
|
2022-07-08 09:17:43 -04:00
|
|
|
FIELD comp_945 chatMessage Ljava/lang/String;
|
|
|
|
FIELD comp_946 timestamp Ljava/time/Instant;
|
|
|
|
FIELD comp_948 createSignatureInstance Lnet/minecraft/class_7469;
|
|
|
|
FIELD comp_949 previewed Z
|
|
|
|
METHOD <init> (Ljava/lang/String;Ljava/time/Instant;JLnet/minecraft/class_7469;Z)V
|
2022-05-12 09:36:43 -04:00
|
|
|
ARG 1 chatMessage
|
2021-02-28 15:44:19 -05:00
|
|
|
METHOD <init> (Lnet/minecraft/class_2540;)V
|
|
|
|
ARG 1 buf
|
2022-07-08 09:17:43 -04:00
|
|
|
METHOD comp_945 chatMessage ()Ljava/lang/String;
|
|
|
|
METHOD comp_946 timestamp ()Ljava/time/Instant;
|
|
|
|
METHOD comp_948 createSignatureInstance ()Lnet/minecraft/class_7469;
|
|
|
|
METHOD comp_949 previewed ()Z
|
2022-05-17 05:56:35 -04:00
|
|
|
COMMENT {@return whether the chat message was previewed before sending}
|
|
|
|
COMMENT
|
|
|
|
COMMENT @apiNote Chat decorators can produce signed decorated content only if it was previewed.
|