public final class AlpineClientApi
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static @NotNull java.util.Collection<AlpinePlayer> |
getAllPlayers()
Get all players connected via Alpine Client.
|
static @NotNull java.util.Optional<AlpinePlayer> |
getPlayer(@NotNull org.bukkit.entity.Player player)
Get a player connected via Alpine Client.
|
static @NotNull java.util.Optional<AlpinePlayer> |
getPlayer(@NotNull java.util.UUID id)
Get a player connected via Alpine Client.
|
static boolean |
isPlayerConnected(@NotNull AlpinePlayer player)
Check if a player is currently connected via Alpine Client.
|
static boolean |
isPlayerConnected(@NotNull org.bukkit.entity.Player player)
Check if a player is connected via Alpine Client.
|
static boolean |
isPlayerConnected(@NotNull java.util.UUID id)
Check if a player is connected via Alpine Client.
|
static void |
registerCapabilities(@NotNull org.bukkit.plugin.Plugin plugin,
Capability... capabilities)
Registers Alpine Client capabilities for a given plugin.
|
static void |
unregisterCapabilities(@NotNull org.bukkit.plugin.Plugin plugin)
Unregister all Alpine Client capabilities for a given plugin.
|
public static boolean isPlayerConnected(@NotNull @NotNull AlpinePlayer player)
player
- the AlpinePlayer
true
if the player is using Alpine Clientpublic static boolean isPlayerConnected(@NotNull @NotNull org.bukkit.entity.Player player)
player
- the Player
true
if the player is using Alpine Clientpublic static boolean isPlayerConnected(@NotNull @NotNull java.util.UUID id)
id
- the UUID
of the players accounttrue
if the player is using Alpine Client@NotNull public static @NotNull java.util.Optional<AlpinePlayer> getPlayer(@NotNull @NotNull org.bukkit.entity.Player player)
player
- the Player
Optional
describing the player@NotNull public static @NotNull java.util.Optional<AlpinePlayer> getPlayer(@NotNull @NotNull java.util.UUID id)
id
- the UUID
of the players accountOptional
describing the player@NotNull public static @NotNull java.util.Collection<AlpinePlayer> getAllPlayers()
AlpinePlayer
public static void registerCapabilities(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull Capability... capabilities)
Should be called once for all your desired capabilities on plugin enable.
plugin
- the responsible Plugin
capabilities
- a varargs array containing Capability
Plugin.onEnable()
public static void unregisterCapabilities(@NotNull @NotNull org.bukkit.plugin.Plugin plugin)
Should be called once on plugin disable.
plugin
- the responsible Plugin
Plugin.onDisable()