From 3b15ccc188d19ae9f58c8dd684a11cab9d7661b1 Mon Sep 17 00:00:00 2001 From: Riley Park Date: Tue, 13 Oct 2020 22:42:14 -0700 Subject: [PATCH] api: Remove deprecated methods (#181) --- .../kyori/adventure/audience/Audience.java | 53 ------------------- .../adventure/audience/EmptyAudience.java | 10 ---- .../audience/ForwardingAudience.java | 12 ----- 3 files changed, 75 deletions(-) diff --git a/api/src/main/java/net/kyori/adventure/audience/Audience.java b/api/src/main/java/net/kyori/adventure/audience/Audience.java index 5e8526481..04ab3026a 100644 --- a/api/src/main/java/net/kyori/adventure/audience/Audience.java +++ b/api/src/main/java/net/kyori/adventure/audience/Audience.java @@ -133,59 +133,6 @@ public interface Audience { return Audiences.COLLECTOR; } - /** - * Sends a chat message. - * - * @param message a message - * @see Component - * @since 4.0.0 - * @deprecated use {@link #sendMessage(Identified, ComponentLike)} or {@link #sendMessage(Identity, ComponentLike)} - */ - @Deprecated - default void sendMessage(final @NonNull ComponentLike message) { - this.sendMessage(message.asComponent()); - } - - /** - * Sends a chat message. - * - * @param message a message - * @see Component - * @since 4.0.0 - * @deprecated use {@link #sendMessage(Identified, Component)} or {@link #sendMessage(Identity, Component)} - */ - @Deprecated - default void sendMessage(final @NonNull Component message) { - this.sendMessage(message, MessageType.SYSTEM); - } - - /** - * Sends a chat message. - * - * @param message a message - * @param type the type - * @see Component - * @since 4.0.0 - * @deprecated use {@link #sendMessage(Identified, ComponentLike, MessageType)} or {@link #sendMessage(Identity, ComponentLike, MessageType)} - */ - @Deprecated - default void sendMessage(final @NonNull ComponentLike message, final @NonNull MessageType type) { - this.sendMessage(message.asComponent(), type); - } - - /** - * Sends a chat message. - * - * @param message a message - * @param type the type - * @see Component - * @since 4.0.0 - * @deprecated use {@link #sendMessage(Identified, Component, MessageType)} or {@link #sendMessage(Identity, Component, MessageType)} - */ - @Deprecated - default void sendMessage(final @NonNull Component message, final @NonNull MessageType type) { - } - /** * Sends a chat message. * diff --git a/api/src/main/java/net/kyori/adventure/audience/EmptyAudience.java b/api/src/main/java/net/kyori/adventure/audience/EmptyAudience.java index 4cfb4ddc3..531cffd5d 100644 --- a/api/src/main/java/net/kyori/adventure/audience/EmptyAudience.java +++ b/api/src/main/java/net/kyori/adventure/audience/EmptyAudience.java @@ -32,16 +32,6 @@ final class EmptyAudience implements Audience { static final EmptyAudience INSTANCE = new EmptyAudience(); - @Deprecated - @Override - public void sendMessage(final @NonNull ComponentLike message) { - } - - @Deprecated - @Override - public void sendMessage(final @NonNull ComponentLike message, final @NonNull MessageType type) { - } - @Override public void sendMessage(final @NonNull Identified source, final @NonNull ComponentLike message) { } diff --git a/api/src/main/java/net/kyori/adventure/audience/ForwardingAudience.java b/api/src/main/java/net/kyori/adventure/audience/ForwardingAudience.java index 908a3996b..d1ab3619b 100644 --- a/api/src/main/java/net/kyori/adventure/audience/ForwardingAudience.java +++ b/api/src/main/java/net/kyori/adventure/audience/ForwardingAudience.java @@ -54,12 +54,6 @@ public interface ForwardingAudience extends Audience { */ @NonNull Iterable audiences(); - @Deprecated - @Override - default void sendMessage(final @NonNull Component message, final @NonNull MessageType type) { - for(final Audience audience : this.audiences()) audience.sendMessage(message, type); - } - @Override default void sendMessage(final @NonNull Identified source, final @NonNull Component message, final @NonNull MessageType type) { for(final Audience audience : this.audiences()) audience.sendMessage(source, message, type); @@ -146,12 +140,6 @@ interface Single extends ForwardingAudience { return Collections.singleton(this.audience()); } - @Deprecated - @Override - default void sendMessage(final @NonNull Component message, final @NonNull MessageType type) { - this.audience().sendMessage(message, type); - } - @Override default void sendMessage(final @NonNull Identified source, final @NonNull ComponentLike message, final @NonNull MessageType type) { this.audience().sendMessage(source, message, type);