use of net.minecraft.server.management.UserListWhitelistEntry in project SpongeCommon by SpongePowered.
the class UserDiscoverer method getFromWhitelist.
private static User getFromWhitelist(UUID uniqueId) {
GameProfile profile = null;
UserListWhitelist whiteList = SpongeImpl.getServer().getPlayerList().getWhitelistedPlayers();
UserListWhitelistEntry whiteListData = whiteList.getEntry(new GameProfile(uniqueId, ""));
if (whiteListData != null) {
profile = whiteListData.value;
}
if (profile != null) {
return create(profile);
}
return null;
}
use of net.minecraft.server.management.UserListWhitelistEntry in project SpongeCommon by SpongePowered.
the class SpongeWhitelistService method addProfile.
@Override
public boolean addProfile(GameProfile profile) {
boolean wasWhitelisted = this.isWhitelisted(profile);
UserListUtils.addEntry(getWhitelist(), new UserListWhitelistEntry((com.mojang.authlib.GameProfile) profile));
return wasWhitelisted;
}
Aggregations