Minor cleanup and add some missing Deprecated tags

This commit is contained in:
Andrew Steinborn
2020-06-28 21:29:25 -04:00
parent 2e7a598916
commit 70a989e955
4 changed files with 8 additions and 19 deletions

View File

@@ -33,6 +33,7 @@ public final class KickedFromServerEvent implements
* @param duringServerConnect whether or not the player was kicked during the connection process
* @param fancyReason a fancy reason for being disconnected, used for the initial result
*/
@Deprecated
public KickedFromServerEvent(Player player, RegisteredServer server,
@Nullable Component originalReason, boolean duringServerConnect, Component fancyReason) {
this(player, server, originalReason, duringServerConnect, Notify.create(fancyReason));
@@ -46,10 +47,9 @@ public final class KickedFromServerEvent implements
* @param duringServerConnect whether or not the player was kicked during the connection process
* @param result the initial result
*/
public KickedFromServerEvent(Player player,
RegisteredServer server,
@Nullable Component originalReason, boolean duringServerConnect,
ServerKickResult result) {
@Deprecated
public KickedFromServerEvent(Player player, RegisteredServer server,
@Nullable Component originalReason, boolean duringServerConnect, ServerKickResult result) {
this(player, server, AdventureCompat.asAdventureComponent(originalReason), duringServerConnect,
result);
}

View File

@@ -34,8 +34,9 @@ public interface TabListEntry {
*
* @return {@link Optional} text {@link net.kyori.text.Component} of name displayed in the tab
* list
*
* @deprecated Use {@link #getDisplayNameComponent()} instead
*/
@Deprecated
Optional<net.kyori.text.Component> getDisplayName();
/**
@@ -56,6 +57,7 @@ public interface TabListEntry {
* @return {@code this}, for chaining
* @deprecated Use {@link #setDisplayName(Component)} instead
*/
@Deprecated
TabListEntry setDisplayName(net.kyori.text.Component displayName);
/**

View File

@@ -293,6 +293,7 @@ public final class ServerPing {
return samplePlayers;
}
@Deprecated
public Optional<net.kyori.text.Component> getDescription() {
return Optional.ofNullable(description).map(AdventureCompat::asOriginalTextComponent);
}