crwdns118063:0crwdne118063:0
crwdns118065:0:javadoc:crwdnd118065:0:javadoc:crwdne118065:0
import org.spongepowered.api.Sponge;
import org.spongepowered.api.profile.GameProfileManager;
GameProfileManager profileManager = Sponge.getServer().getGameProfileManager();
crwdns118067:0crwdne118067:0
crwdns118069:0crwdne118069:0
crwdns118071:0crwdne118071:0
crwdns118073:0crwdne118073:0
import org.spongepowered.api.profile.GameProfile;
import java.util.concurrent.CompletableFuture;
CompletableFuture<GameProfile> futureGameProfile = profileManager.get("Notch");
crwdns118075:0crwdne118075:0
import java.util.UUID;
CompletableFuture<GameProfile> futureGameProfile =
profileManager.get(UUID.fromString("069a79f4-44e9-4726-a5be-fca90e38aaf5"));
Tip
crwdns118077:0:javadoc:crwdnd118077:0:javadoc:crwdne118077:0
crwdns118079:0crwdne118079:0
crwdns118081:0crwdne118081:0
GameProfile gameProfile = futureGameProfile.get();
Warning
crwdns118083:0crwdne118083:0
crwdns118085:0crwdne118085:0
crwdns118087:0:javadoc:crwdne118087:0
GameProfile gameProfile = GameProfile.of(
UUID.fromString("00000000-0000-0000-0000-000000000000"),
"Herobrine");
Note
crwdns118089:0crwdne118089:0
crwdns118091:0crwdne118091:0
crwdns118093:0crwdne118093:0
GameProfile filledProfile = profileManager.fill(gameProfile).get();
crwdns118095:0crwdne118095:0
crwdns118097:0:javadoc:crwdnd118097:0:javadoc:crwdnd118097:0:javadoc:crwdne118097:0
import org.spongepowered.api.profile.property.ProfileProperty;
import java.util.Collection;
profile.getPropertyMap().put(
"key", ProfileProperty.of("foo", "bar", null));
Collection<ProfileProperty> customProperties = profile.getPropertyMap().get("key");
crwdns118099:0crwdne118099:0
crwdns118101:0:javadoc:crwdnd118101:0:javadoc:crwdne118101:0
import org.spongepowered.api.profile.GameProfileCache;
GameProfile fakeProfile =
GameProfile.of(UUID.fromString("00000000-0000-0000-0000-000000000000"),
"Herobrine");
GameProfileCache cache = profileManager.getCache();
cache.add(profile);
Tip
crwdns118103:0:javadoc:crwdne118103:0
crwdns118105:0:javadoc:crwdnd118105:0:javadoc:crwdne118105:0
crwdns118107:0:javadoc:crwdnd118107:0:javadoc:crwdne118107:0