From f2b20e639880350c2e73d97cef697dc7aa1a6e46 Mon Sep 17 00:00:00 2001 From: Artuto Date: Sat, 12 Jun 2021 13:48:42 -0500 Subject: [PATCH] Remove usage of Optional --- api/src/main/java/com/velocitypowered/api/proxy/Player.java | 2 +- .../proxy/connection/client/ConnectedPlayer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 71f6d6006..1e5fa027d 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/Player.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/Player.java @@ -281,5 +281,5 @@ public interface Player extends CommandSource, Identified, InboundConnection, * * @return the player's client brand */ - Optional getClientBrand(); + @Nullable String getClientBrand(); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 387b721da..73c9514e3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -873,8 +873,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } @Override - public Optional getClientBrand() { - return Optional.ofNullable(clientBrand); + public String getClientBrand() { + return clientBrand; } void setClientBrand(String clientBrand) {