crwdns137623:0crwdne137623:0
Warning
crwdns137625:0crwdne137625:0
crwdns137627:0:javadoc:crwdnd137627:0:javadoc:crwdne137627:0
import org.spongepowered.api.Sponge;
import org.spongepowered.api.profile.GameProfileManager;
GameProfileManager profileManager = Sponge.getServer().getGameProfileManager();
crwdns137629:0crwdne137629:0
crwdns137631:0crwdne137631:0
crwdns137633:0crwdne137633:0
crwdns137635:0crwdne137635:0
import org.spongepowered.api.profile.GameProfile;
import java.util.concurrent.CompletableFuture;
CompletableFuture<GameProfile> futureGameProfile = profileManager.get("Notch");
crwdns137637:0crwdne137637:0
import java.util.UUID;
CompletableFuture<GameProfile> futureGameProfile =
profileManager.get(UUID.fromString("069a79f4-44e9-4726-a5be-fca90e38aaf5"));
Tip
crwdns137639:0:javadoc:crwdnd137639:0:javadoc:crwdne137639:0
crwdns137641:0crwdne137641:0
crwdns137643:0crwdne137643:0
GameProfile gameProfile = futureGameProfile.get();
Warning
crwdns137645:0crwdne137645:0
crwdns137647:0crwdne137647:0
crwdns137649:0:javadoc:crwdne137649:0
GameProfile gameProfile = GameProfile.of(
UUID.fromString("00000000-0000-0000-0000-000000000000"),
"Herobrine");
Note
crwdns137651:0crwdne137651:0
crwdns137653:0crwdne137653:0
crwdns137655:0crwdne137655:0
GameProfile filledProfile = profileManager.fill(gameProfile).get();
crwdns137657:0crwdne137657:0
crwdns137659:0:javadoc:crwdnd137659:0:javadoc:crwdnd137659:0:javadoc:crwdne137659: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");
crwdns137661:0crwdne137661:0
crwdns137663:0:javadoc:crwdnd137663:0:javadoc:crwdne137663: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
crwdns137665:0:javadoc:crwdne137665:0
crwdns137667:0:javadoc:crwdnd137667:0:javadoc:crwdne137667:0
crwdns137669:0:javadoc:crwdnd137669:0:javadoc:crwdne137669:0