fix queueevent message attempting to be send when the player is not connected
This commit is contained in:
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user