Untitled

mail@pastecode.io avatar
unknown
java
a month ago
441 B
2
Indexable
Never
    @Override
    public @NotNull List<Player> getPlayersInCombat() {
        Set<UUID> playerIdSet = getPlayerIdsInCombat();
        List<Player> playerList = new ArrayList<>();

        for (UUID playerId : playerIdSet) {
            Player player = Bukkit.getPlayer(playerId);
            if (player != null) {
                playerList.add(player);
            }
        }

        return Collections.unmodifiableList(playerList);
    }
Leave a Comment