fix queueevent message attempting to be send when the player is not connected

This commit is contained in:
ajgeiss0702
2021-12-11 10:47:26 -07:00
parent bce37cb278
commit fd7f16189c
2 changed files with 2 additions and 1 deletions
@@ -106,7 +106,7 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
@Override
public String getServerName() {
Optional<ServerConnection> serverConnection = handle.getCurrentServer();
if(!serverConnection.isPresent()) return "none";
if(!serverConnection.isPresent()) return null;
ServerConnection connection = serverConnection.get();
return connection.getServerInfo().getName();
}