Skip to content

Commit

Permalink
api: delete PlayerIdentified
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Nov 22, 2022
1 parent e4d89b9 commit 9e1f50d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 285 deletions.
64 changes: 3 additions & 61 deletions api/src/main/java/net/kyori/adventure/audience/Audience.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import net.kyori.adventure.chat.SignedMessage;
import net.kyori.adventure.identity.Identified;
import net.kyori.adventure.identity.Identity;
import net.kyori.adventure.identity.PlayerIdentified;
import net.kyori.adventure.identity.PlayerIdentity;
import net.kyori.adventure.inventory.Book;
import net.kyori.adventure.pointer.Pointered;
import net.kyori.adventure.sound.Sound;
Expand Down Expand Up @@ -281,7 +279,7 @@ default void sendMessage(final @NotNull Identity source, final @NotNull Componen
* @param message a message
* @see Component
* @since 4.0.0
* @deprecated since 4.12.0, the client errors on receiving and can reject identified messages without {@link SignedMessage} data, this may be unsupported in the future, use {@link #sendChatMessage(SignedMessage, PlayerIdentified)} instead
* @deprecated since 4.12.0, the client errors on receiving and can reject identified messages without {@link SignedMessage} data, this may be unsupported in the future, use {@link #sendMessage(SignedMessage, ChatType.Bound)} instead
*/
@Deprecated
@ForwardingAudienceOverrideNotRequired
Expand All @@ -296,7 +294,7 @@ default void sendMessage(final @NotNull Identified source, final @NotNull Compon
* @param message a message
* @see Component
* @since 4.0.0
* @deprecated since 4.12.0, the client errors on receiving and can reject identified messages without {@link SignedMessage} data, this may be unsupported in the future, use {@link #sendChatMessage(SignedMessage, PlayerIdentity)} instead
* @deprecated since 4.12.0, the client errors on receiving and can reject identified messages without {@link SignedMessage} data, this may be unsupported in the future, use {@link #sendMessage(SignedMessage, ChatType.Bound)} instead
*/
@Deprecated
@ForwardingAudienceOverrideNotRequired
Expand Down Expand Up @@ -376,34 +374,6 @@ default void sendMessage(final @NotNull Identity source, final @NotNull Componen
/* End: unsigned player messages */

/* Start: disguised player messages */
/**
* Sends a chat message from the given {@link PlayerIdentified} to this {@link Audience} with the {@link ChatType#CHAT} chat type.
*
* @param component the component content
* @param source the source of the message
* @see #sendMessage(Component, ChatType.Bound)
* @since 4.12.0
* @sinceMinecraft 1.19
*/
@ForwardingAudienceOverrideNotRequired
default void sendChatMessage(final @NotNull Component component, final @NotNull PlayerIdentified source) {
this.sendChatMessage(component, source.identity());
}

/**
* Sends a chat message from the given {@link PlayerIdentity} to this {@link Audience} with the {@link ChatType#CHAT} chat type.
*
* @param component the component content
* @param source the source of the message
* @see #sendMessage(Component, ChatType.Bound)
* @since 4.12.0
* @sinceMinecraft 1.19
*/
@ForwardingAudienceOverrideNotRequired
default void sendChatMessage(final @NotNull Component component, final @NotNull PlayerIdentity source) {
this.sendMessage(component, ChatType.CHAT.bind(source.name()));
}

/**
* Sends a message to this {@link Audience} with the provided {@link ChatType.Bound bound chat type}.
*
Expand All @@ -412,39 +382,11 @@ default void sendChatMessage(final @NotNull Component component, final @NotNull
* @since 4.12.0
* @sinceMinecraft 1.19
*/
default void sendMessage(final @NotNull Component message, final @NotNull ChatType.Bound boundChatType) {
default void sendMessage(final @NotNull Component message, final ChatType.@NotNull Bound boundChatType) {
}
/* End: disguised player messages
/* Start: signed player messages */
/**
* Sends a signed player chat message from the given {@link PlayerIdentified} to this {@link Audience} with the {@link ChatType#CHAT} chat type.
*
* @param signedMessage the signed message data
* @param source the source of the message
* @see #sendMessage(SignedMessage, ChatType.Bound)
* @since 4.12.0
* @sinceMinecraft 1.19
*/
@ForwardingAudienceOverrideNotRequired
default void sendChatMessage(final @NotNull SignedMessage signedMessage, final @NotNull PlayerIdentified source) {
this.sendChatMessage(signedMessage, source.identity());
}

/**
* Sends a signed player chat message from the player identified by the provided {@link PlayerIdentity} to this {@link Audience} with the {@link ChatType#CHAT} chat type.
*
* @param signedMessage the signed message data
* @param source the identity of the source of the message
* @see #sendMessage(SignedMessage, ChatType.Bound)
* @since 4.12.0
* @sinceMinecraft 1.19
*/
@ForwardingAudienceOverrideNotRequired
default void sendChatMessage(final @NotNull SignedMessage signedMessage, final @NotNull PlayerIdentity source) {
this.sendMessage(signedMessage, ChatType.CHAT.bind(source.name()));
}

/**
* Sends a signed player message to this {@link Audience} with the provided {@link ChatType.Bound bound chat type}.
*
Expand Down

This file was deleted.

103 changes: 0 additions & 103 deletions api/src/main/java/net/kyori/adventure/identity/PlayerIdentity.java

This file was deleted.

This file was deleted.

0 comments on commit 9e1f50d

Please sign in to comment.