From d482dc7f4fbcc8609c9168fb939ab3a29e976181 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 26 Aug 2018 19:44:15 -0400 Subject: [PATCH] Clean this up --- .../java/com/velocitypowered/proxy/command/ServerCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/ServerCommand.java b/proxy/src/main/java/com/velocitypowered/proxy/command/ServerCommand.java index fe7bb5b55..f9d6ac460 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/command/ServerCommand.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/command/ServerCommand.java @@ -36,8 +36,8 @@ public class ServerCommand implements Command { player.createConnectionRequest(server.get()).fireAndForget(); } else { - String currentServer = ((Player) source).getCurrentServer().map(ServerConnection::getServerInfo) - .map(ServerInfo::getName).orElse(""); + String currentServer = player.getCurrentServer().map(ServerConnection::getServerInfo).map(ServerInfo::getName) + .orElse(""); player.sendMessage(TextComponent.of("You are currently connected to " + currentServer + ".", TextColor.YELLOW)); // Assemble the list of servers as components