Skip to content

Commit

Permalink
api: Remove deprecated methods (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashike committed Oct 14, 2020
1 parent b12e4a4 commit 3b15ccc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 75 deletions.
53 changes: 0 additions & 53 deletions api/src/main/java/net/kyori/adventure/audience/Audience.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
10 changes: 0 additions & 10 deletions api/src/main/java/net/kyori/adventure/audience/EmptyAudience.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ public interface ForwardingAudience extends Audience {
*/
@NonNull Iterable<? extends Audience> 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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3b15ccc

Please sign in to comment.