Clean up ConnectedPlayer initialization.
This commit is contained in:
@@ -164,8 +164,8 @@ public class LoginSessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
VelocityServer.getServer().getEventManager().fire(profileRequestEvent).thenCompose(profileEvent -> {
|
VelocityServer.getServer().getEventManager().fire(profileRequestEvent).thenCompose(profileEvent -> {
|
||||||
// Initiate a regular connection and move over to it.
|
// Initiate a regular connection and move over to it.
|
||||||
ConnectedPlayer player = new ConnectedPlayer(profileEvent.getGameProfile() == null ? profile : profileEvent.getGameProfile(),
|
ConnectedPlayer player = new ConnectedPlayer(profileEvent.getGameProfile(), inbound,
|
||||||
inbound, apiInbound.getVirtualHost().orElse(null));
|
apiInbound.getVirtualHost().orElse(null));
|
||||||
|
|
||||||
return VelocityServer.getServer().getEventManager().fire(new PermissionsSetupEvent(player, ConnectedPlayer.DEFAULT_PERMISSIONS))
|
return VelocityServer.getServer().getEventManager().fire(new PermissionsSetupEvent(player, ConnectedPlayer.DEFAULT_PERMISSIONS))
|
||||||
.thenCompose(event -> {
|
.thenCompose(event -> {
|
||||||
|
Reference in New Issue
Block a user