From a76c01df4bba843efbf01e7985e7f51972fb573b Mon Sep 17 00:00:00 2001 From: Riley Park Date: Thu, 15 Oct 2020 08:24:41 -0700 Subject: [PATCH] Fix a few javadoc-related problems --- .../com/velocitypowered/api/command/CommandSource.java | 4 +++- .../main/java/com/velocitypowered/api/proxy/Player.java | 9 ++++++--- .../java/com/velocitypowered/api/proxy/ProxyServer.java | 8 ++++++-- .../com/velocitypowered/api/util/title/package-info.java | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/command/CommandSource.java b/api/src/main/java/com/velocitypowered/api/command/CommandSource.java index 346b21c27..2402976cd 100644 --- a/api/src/main/java/com/velocitypowered/api/command/CommandSource.java +++ b/api/src/main/java/com/velocitypowered/api/command/CommandSource.java @@ -3,6 +3,7 @@ package com.velocitypowered.api.command; import com.velocitypowered.api.permission.PermissionSubject; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.MessageType; +import net.kyori.adventure.identity.Identified; import net.kyori.adventure.identity.Identity; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.legacytext3.LegacyText3ComponentSerializer; @@ -17,7 +18,8 @@ public interface CommandSource extends Audience, PermissionSubject { * Sends the specified {@code component} to the invoker. * * @param component the text component to send - * @deprecated Use {@link #sendMessage(Component)} instead + * @deprecated Use {@link #sendMessage(Identified, Component)} + * or {@link #sendMessage(Identity, Component)} instead */ @Deprecated void sendMessage(net.kyori.text.Component component); diff --git a/api/src/main/java/com/velocitypowered/api/proxy/Player.java b/api/src/main/java/com/velocitypowered/api/proxy/Player.java index 3761843e2..598cb07a6 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/Player.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/Player.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; import java.util.UUID; import net.kyori.adventure.identity.Identified; +import net.kyori.adventure.identity.Identity; import net.kyori.adventure.text.Component; /** @@ -77,7 +78,8 @@ public interface Player extends CommandSource, Identified, InboundConnection, * Sends a chat message to the player's client. * * @param component the chat message to send - * @deprecated Use {@link #sendMessage(net.kyori.adventure.text.Component)} + * @deprecated Use {@link #sendMessage(Identified, Component)} + * or {@link #sendMessage(Identity, Component)} instead */ @Deprecated @Override @@ -90,8 +92,9 @@ public interface Player extends CommandSource, Identified, InboundConnection, * * @param component the chat message to send * @param position the position for the message - * @deprecated Use @deprecated Use {@link #sendMessage(net.kyori.adventure.text.Component)} or - * {@link #sendActionBar(net.kyori.adventure.text.Component)} + * @deprecated Use @deprecated Use {@link #sendMessage(Identified, Component)} or + * {@link #sendMessage(Identity, Component)} for chat messages, or + * {@link #sendActionBar(net.kyori.adventure.text.Component)} for action bar messages */ @Deprecated void sendMessage(net.kyori.text.Component component, MessagePosition position); diff --git a/api/src/main/java/com/velocitypowered/api/proxy/ProxyServer.java b/api/src/main/java/com/velocitypowered/api/proxy/ProxyServer.java index d9ed1e4c8..f0b3876a0 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/ProxyServer.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/ProxyServer.java @@ -18,6 +18,9 @@ import java.util.Collection; import java.util.Optional; import java.util.UUID; import net.kyori.adventure.audience.Audience; +import net.kyori.adventure.identity.Identified; +import net.kyori.adventure.identity.Identity; +import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.NonNull; /** @@ -26,7 +29,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; public interface ProxyServer extends Audience { /** - * Shuts down the proxy, kicking players with the specified {@param reason}. + * Shuts down the proxy, kicking players with the specified {@code reason}. * * @param reason message to kick online players with */ @@ -58,7 +61,8 @@ public interface ProxyServer extends Audience { * Broadcasts a message to all players currently online. * * @param component the message to send - * @deprecated Use {@link #sendMessage(net.kyori.adventure.text.Component)} instead + * @deprecated Use {@link #sendMessage(Identified, Component)} + * or {@link #sendMessage(Identity, Component)} instead */ @Deprecated void broadcast(net.kyori.text.Component component); diff --git a/api/src/main/java/com/velocitypowered/api/util/title/package-info.java b/api/src/main/java/com/velocitypowered/api/util/title/package-info.java index bedf52abb..e77c9e981 100644 --- a/api/src/main/java/com/velocitypowered/api/util/title/package-info.java +++ b/api/src/main/java/com/velocitypowered/api/util/title/package-info.java @@ -1,6 +1,6 @@ /** * Provides data structures for creating and manipulating titles. * - * @deprecated Replaced with {@link net.kyori.adventure.title} + * @deprecated Replaced with {@link net.kyori.adventure.title.Title} */ package com.velocitypowered.api.util.title; \ No newline at end of file