mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
#719: Add Player Profile API
Slight changes may occur as this API is stabilized. This PR is based on work previously done by DerFrZocker in #663. By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
@@ -6,6 +6,7 @@ import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.ServerOperator;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -39,6 +40,18 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@NotNull
|
||||
public UUID getUniqueId();
|
||||
|
||||
/**
|
||||
* Gets a copy of the player's profile.
|
||||
* <p>
|
||||
* If the player is online, the returned profile will be complete.
|
||||
* Otherwise, only the unique id is guaranteed to be present. You can use
|
||||
* {@link PlayerProfile#update()} to complete the returned profile.
|
||||
*
|
||||
* @return the player's profile
|
||||
*/
|
||||
@NotNull
|
||||
PlayerProfile getPlayerProfile();
|
||||
|
||||
/**
|
||||
* Checks if this player is banned or not
|
||||
*
|
||||
|
Reference in New Issue
Block a user