use of org.spongepowered.common.accessor.server.players.StoredUserEntryAccessor in project SpongeCommon by SpongePowered.
the class SpongeWhitelistService method whitelistedProfiles.
@SuppressWarnings("unchecked")
@Override
public CompletableFuture<Collection<GameProfile>> whitelistedProfiles() {
final List<GameProfile> profiles = new ArrayList<>();
final UserWhiteList list = SpongeCommon.server().getPlayerList().getWhiteList();
for (final UserWhiteListEntry entry : ((StoredUserListAccessor<com.mojang.authlib.GameProfile, UserWhiteListEntry>) list).accessor$map().values()) {
profiles.add(SpongeGameProfile.of(((StoredUserEntryAccessor<com.mojang.authlib.GameProfile>) entry).accessor$user()));
}
return CompletableFuture.completedFuture(profiles);
}
Aggregations