Move message related stuff to a new package (#3185)

* Move message related stuff to a new package

* Fix javadoc

* Fix javadoc

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
apple502j 2022-06-02 02:39:22 +09:00 committed by GitHub
parent 4e2aaef111
commit 6446e1a888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 34 additions and 33 deletions

View File

@ -112,7 +112,7 @@ CLASS net/minecraft/class_746 net/minecraft/client/network/ClientPlayerEntity
METHOD method_33689 init ()V
METHOD method_43609 signChatMessage (Lnet/minecraft/class_7470;Lnet/minecraft/class_2561;)Lnet/minecraft/class_7469;
COMMENT Signs the chat message. If the chat message cannot be signed, this will return
COMMENT {@link ChatMessageSignature#none()}.
COMMENT {@link MessageSignature#none()}.
ARG 1 signer
ARG 2 message
METHOD method_43786 signArguments (Lnet/minecraft/class_7470;Lcom/mojang/brigadier/ParseResults;Lnet/minecraft/class_2561;)Lnet/minecraft/class_7450;

View File

@ -63,7 +63,7 @@ CLASS net/minecraft/class_2196 net/minecraft/command/argument/MessageArgumentTyp
COMMENT {@return the verifiable part of {@code message}, or {@code null} when there is none}
COMMENT
COMMENT @implNote If the preview is signed, the decorated message will be returned, and
COMMENT if it's unsigned or unpreviewed but {@linkplain ChatMessageSignature#canVerify
COMMENT if it's unsigned or unpreviewed but {@linkplain MessageSignature#canVerify
COMMENT verifiable}, the plain, undecorated message will be returned. If neither is true,
COMMENT this returns {@code null}, since the message cannot be verified in any way.
ARG 1 decorated

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7450 net/minecraft/network/encryption/ArgumentSignatureDataMap
CLASS net/minecraft/class_7450 net/minecraft/network/message/ArgumentSignatureDataMap
COMMENT A record holding the salt and signatures for all signable arguments of an executed command.
FIELD field_39185 MAX_ARGUMENT_NAME_LENGTH I
FIELD field_39418 MAX_ARGUMENTS I

View File

@ -1,5 +1,5 @@
CLASS net/minecraft/class_7470 net/minecraft/network/encryption/ChatMessageSigner
COMMENT A signer for chat messages that produces {@link ChatMessageSignature}.
CLASS net/minecraft/class_7470 net/minecraft/network/message/ChatMessageSigner
COMMENT A signer for chat messages that produces {@link MessageSignature}.
METHOD method_43864 sign (Lnet/minecraft/class_7501;Ljava/lang/String;)Lnet/minecraft/class_7469;
COMMENT {@return the chat message signature obtained by signing {@code message} with {@code signature}}
ARG 1 signer

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7448 net/minecraft/network/encryption/CommandArgumentSigner
CLASS net/minecraft/class_7448 net/minecraft/network/message/CommandArgumentSigner
COMMENT A signer for command arguments.
FIELD field_39182 NONE Lnet/minecraft/class_7448;
METHOD getArgumentSignature (Ljava/lang/String;)Lnet/minecraft/class_7469;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7436 net/minecraft/network/MessageSender
CLASS net/minecraft/class_7436 net/minecraft/network/message/MessageSender
COMMENT The sender, or the source, of a message.
COMMENT
COMMENT <p>An instance can be obtained via {@link net.minecraft.entity.Entity#asMessageSender}.

View File

@ -1,5 +1,6 @@
CLASS net/minecraft/class_7469 net/minecraft/network/encryption/ChatMessageSignature
COMMENT A signature for chat messages, consisting of the sender, the timestamp, and the signature data.
CLASS net/minecraft/class_7469 net/minecraft/network/message/MessageSignature
COMMENT A signature for chat messages and message command arguments, consisting
COMMENT of the sender, the timestamp, and the signature data.
FIELD comp_799 timestamp Ljava/time/Instant;
METHOD comp_799 timestamp ()Ljava/time/Instant;
METHOD method_43859 none ()Lnet/minecraft/class_7469;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_2556 net/minecraft/network/MessageType
CLASS net/minecraft/class_2556 net/minecraft/network/message/MessageType
COMMENT A message type (also known as "chat type") controls whether to display or narrate
COMMENT the messages sent to the clients, and if so, how. Message types are registered
COMMENT at {@link net.minecraft.util.registry.BuiltinRegistries#MESSAGE_TYPE}. When

View File

@ -1,5 +1,5 @@
CLASS net/minecraft/class_7471 net/minecraft/network/encryption/SignedChatMessage
COMMENT A signed chat message, consisting of the signature, the signed content,
CLASS net/minecraft/class_7471 net/minecraft/network/message/SignedMessage
COMMENT A signed message, consisting of the signature, the signed content,
COMMENT and the optional unsigned content supplied when the chat decorator produced
COMMENT unsigned message due to the chat preview being disabled on either side.
COMMENT

View File

@ -12,11 +12,11 @@ CLASS net/minecraft/class_7438 net/minecraft/network/packet/s2c/play/ChatMessage
COMMENT discarded by the clients; they instead log a warning.
COMMENT
COMMENT <p>Chat messages have signatures. It is possible to use a bogus signature - such as
COMMENT {@link net.minecraft.network.encryption.ChatMessageSignature#none} - to send a chat
COMMENT {@link net.minecraft.network.message.MessageSignature#none} - to send a chat
COMMENT message; however if the signature is invalid (e.g. because the text's content differs
COMMENT from the one sent by the client, or because the passed signature is invalid) the client
COMMENT will log a warning. See {@link
COMMENT net.minecraft.network.encryption.ChatMessageSignature#updateSignature} for how the
COMMENT net.minecraft.network.message.MessageSignature#updateSignature} for how the
COMMENT message is signed.
COMMENT
COMMENT @see net.minecraft.server.network.ServerPlayerEntity#sendChatMessage

View File

@ -147,8 +147,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 playerMessageFactory
COMMENT a function that takes the player to send the message to
@ -160,11 +160,11 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT message can be sent to a different player.
COMMENT
COMMENT <p>Chat messages have signatures. It is possible to use a bogus signature - such as
COMMENT {@link net.minecraft.network.encryption.ChatMessageSignature#none} - to send a chat
COMMENT {@link net.minecraft.network.message.MessageSignature#none} - to send a chat
COMMENT message; however if the signature is invalid (e.g. because the text's content differs
COMMENT from the one sent by the client, or because the passed signature is invalid) the client
COMMENT will log a warning. See {@link
COMMENT net.minecraft.network.encryption.ChatMessageSignature#updateSignature} for how the
COMMENT net.minecraft.network.message.MessageSignature#updateSignature} for how the
COMMENT message is signed.
COMMENT
COMMENT @apiNote This method is used to broadcast a message sent by a player
@ -176,7 +176,7 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, MessageSender, RegistryKey)
ARG 1 message
ARG 2 playerMessageFactory
COMMENT a function that takes the player to send the message to
@ -193,8 +193,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 typeKey
METHOD method_43670 (Lnet/minecraft/class_3222;Lnet/minecraft/server/MinecraftServer$class_7460;)V
@ -205,11 +205,11 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT Broadcasts a chat message to all players and the server console.
COMMENT
COMMENT <p>Chat messages have signatures. It is possible to use a bogus signature - such as
COMMENT {@link net.minecraft.network.encryption.ChatMessageSignature#none} - to send a chat
COMMENT {@link net.minecraft.network.message.MessageSignature#none} - to send a chat
COMMENT message; however if the signature is invalid (e.g. because the text's content differs
COMMENT from the one sent by the client, or because the passed signature is invalid) the client
COMMENT will log a warning. See {@link
COMMENT net.minecraft.network.encryption.ChatMessageSignature#updateSignature} for how the
COMMENT net.minecraft.network.message.MessageSignature#updateSignature} for how the
COMMENT message is signed.
COMMENT
COMMENT @apiNote This method is used to broadcast a message sent by a player
@ -220,8 +220,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 sender
ARG 3 typeKey
@ -229,11 +229,11 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT Broadcasts a chat message to all players and the server console.
COMMENT
COMMENT <p>Chat messages have signatures. It is possible to use a bogus signature - such as
COMMENT {@link net.minecraft.network.encryption.ChatMessageSignature#none} - to send a chat
COMMENT {@link net.minecraft.network.message.MessageSignature#none} - to send a chat
COMMENT message; however if the signature is invalid (e.g. because the text's content differs
COMMENT from the one sent by the client, or because the passed signature is invalid) the client
COMMENT will log a warning. See {@link
COMMENT net.minecraft.network.encryption.ChatMessageSignature#updateSignature} for how the
COMMENT net.minecraft.network.message.MessageSignature#updateSignature} for how the
COMMENT message is signed.
COMMENT
COMMENT @apiNote This method is used to broadcast messages from commands like {@link
@ -243,7 +243,7 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 sender
ARG 3 typeKey
@ -259,8 +259,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 source
ARG 3 typeKey

View File

@ -220,18 +220,18 @@ CLASS net/minecraft/class_3222 net/minecraft/server/network/ServerPlayerEntity
COMMENT Sends a message to the player.
COMMENT
COMMENT @see #sendMessage(Text)
COMMENT @see #sendChatMessage(SignedChatMessage, ChatMessageSender, RegistryKey)
COMMENT @see #sendChatMessage(SignedMessage, ChatMessageSender, RegistryKey)
ARG 1 message
ARG 2 typeKey
METHOD method_43505 sendChatMessage (Lnet/minecraft/class_7471;Lnet/minecraft/class_7436;Lnet/minecraft/class_5321;)V
COMMENT Sends a chat message to the player.
COMMENT
COMMENT <p>Chat messages have signatures. It is possible to use a bogus signature - such as
COMMENT {@link net.minecraft.network.encryption.ChatMessageSignature#none} - to send a chat
COMMENT {@link net.minecraft.network.message.MessageSignature#none} - to send a chat
COMMENT message; however if the signature is invalid (e.g. because the text's content differs
COMMENT from the one sent by the client, or because the passed signature is invalid) the client
COMMENT will log a warning. See {@link
COMMENT net.minecraft.network.encryption.ChatMessageSignature#updateSignature} for how the
COMMENT net.minecraft.network.message.MessageSignature#updateSignature} for how the
COMMENT message is signed.
COMMENT
COMMENT @see #sendMessage(Text)