final int id = 57;
final int num = 5000000;
final Collection<L2PcInstance> players = L2World.getInstance().getAllPlayers();
final HashSet<Object> seen = new HashSet<>();
players.removeIf(e -> !seen.add(e.getClient().getConnection().getInetAddress().getHostAddress()));
players.forEach(player -> player.addItem("Admin-Reward", id, num, null, true));
activeChar.sendMessage(String.format("Mass-created items in the inventory of %s player(s)",players.size()));
LOGGER.info(String.format("GM %s mass_created item Id: %s ( %s )",activeChar.getName(),id, num));
If you need the number of the players who did not get the reward, you can get them by "seen.getSize()"