Use player name casing from LoginResult
This commit is contained in:
parent
806a6dfaca
commit
5bc189fbb7
@ -92,6 +92,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode();
|
private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode();
|
||||||
@Getter
|
@Getter
|
||||||
private InetSocketAddress virtualHost;
|
private InetSocketAddress virtualHost;
|
||||||
|
private String name;
|
||||||
@Getter
|
@Getter
|
||||||
private UUID uniqueId;
|
private UUID uniqueId;
|
||||||
@Getter
|
@Getter
|
||||||
@ -419,6 +420,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
if ( obj != null && obj.getId() != null )
|
if ( obj != null && obj.getId() != null )
|
||||||
{
|
{
|
||||||
loginProfile = obj;
|
loginProfile = obj;
|
||||||
|
name = obj.getName();
|
||||||
uniqueId = Util.getUUID( obj.getId() );
|
uniqueId = Util.getUUID( obj.getId() );
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
@ -560,7 +562,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
@Override
|
@Override
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return ( loginRequest == null ) ? null : loginRequest.getData();
|
return (name != null ) ? name : ( loginRequest == null ) ? null : loginRequest.getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,6 +9,7 @@ public class LoginResult
|
|||||||
{
|
{
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
private String name;
|
||||||
private Property[] properties;
|
private Property[] properties;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
Loading…
Reference in New Issue
Block a user