mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 21:52:05 -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:
@@ -45,6 +45,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.ServicesManager;
|
||||
import org.bukkit.plugin.messaging.Messenger;
|
||||
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scoreboard.ScoreboardManager;
|
||||
import org.bukkit.structure.StructureManager;
|
||||
@@ -880,6 +881,39 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
public OfflinePlayer getOfflinePlayer(@NotNull UUID id);
|
||||
|
||||
/**
|
||||
* Creates a new {@link PlayerProfile}.
|
||||
*
|
||||
* @param uniqueId the unique id
|
||||
* @param name the name
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if both the unique id is
|
||||
* <code>null</code> and the name is <code>null</code> or blank
|
||||
*/
|
||||
@NotNull
|
||||
PlayerProfile createPlayerProfile(@Nullable UUID uniqueId, @Nullable String name);
|
||||
|
||||
/**
|
||||
* Creates a new {@link PlayerProfile}.
|
||||
*
|
||||
* @param uniqueId the unique id
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the unique id is <code>null</code>
|
||||
*/
|
||||
@NotNull
|
||||
PlayerProfile createPlayerProfile(@NotNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
* Creates a new {@link PlayerProfile}.
|
||||
*
|
||||
* @param name the name
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the name is <code>null</code> or
|
||||
* blank
|
||||
*/
|
||||
@NotNull
|
||||
PlayerProfile createPlayerProfile(@NotNull String name);
|
||||
|
||||
/**
|
||||
* Gets a set containing all current IPs that are banned.
|
||||
*
|
||||
|
Reference in New Issue
Block a user