Use player name casing from LoginResult

This commit is contained in:
BlackHole 2017-05-08 21:55:02 +02:00 committed by md_5
parent 806a6dfaca
commit 5bc189fbb7
2 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode();
@Getter
private InetSocketAddress virtualHost;
private String name;
@Getter
private UUID uniqueId;
@Getter
@ -419,6 +420,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( obj != null && obj.getId() != null )
{
loginProfile = obj;
name = obj.getName();
uniqueId = Util.getUUID( obj.getId() );
finish();
return;
@ -560,7 +562,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public String getName()
{
return ( loginRequest == null ) ? null : loginRequest.getData();
return (name != null ) ? name : ( loginRequest == null ) ? null : loginRequest.getData();
}
@Override

View File

@ -9,6 +9,7 @@ public class LoginResult
{
private String id;
private String name;
private Property[] properties;
@Data