Sending player state to the client when added to protected players.

This commit is contained in:
2022-05-23 23:59:40 +01:00
parent 1976e54424
commit 7de5416692

View File

@ -36,6 +36,13 @@ public class ProtectedPlayerManager {
return;
}
protectedPlayers.add(new ProtectedPlayer(playerUUID, ProtectedPlayer.State.JOINING));
try {
NetworkManager.getChannel().sendTo(new ServerPlayerStatePacket(ProtectedPlayer.State.JOINING),
LoginProtection.getProxy().getServer().getPlayerList().getPlayer(playerUUID).connection.getConnection(),
NetworkDirection.PLAY_TO_CLIENT);
} catch (NullPointerException e) {
removePlayer(playerUUID);
}
}
/**