Package net.luckperms.api.platform
Interface PlayerAdapter<T>
- Type Parameters:
T- the player type
public interface PlayerAdapter<T>
A utility class for adapting platform Player instances to LuckPerms
Users.
Note: this class will only work for online players.
The "player type" parameter must be equal to the class or interface used by the server platform to represent players.
Specifically:
org.bukkit.entity.Playernet.md_5.bungee.api.connection.ProxiedPlayerorg.spongepowered.api/entity.living.player.Playercn.nukkit.Playercom.velocitypowered.api.proxy.Player
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptiongetContext(@NonNull T player) Gets currentactive contextfor theplayer.default @NonNull CachedMetaDatagetMetaData(@NonNull T player) default @NonNull CachedPermissionDatagetPermissionData(@NonNull T player) getQueryOptions(@NonNull T player) Gets currentactive query optionsfor theplayer.Gets theUserinstance for the givenplayer.
-
Method Details
-
getUser
Gets theUserinstance for the givenplayer.- Parameters:
player- the player- Returns:
- the user
- See Also:
-
getContext
Gets currentactive contextfor theplayer.- Parameters:
player- the player- Returns:
- the active context for the player
- See Also:
-
getQueryOptions
Gets currentactive query optionsfor theplayer.- Parameters:
player- the player- Returns:
- the active query options for the player
- See Also:
-
getPermissionData
- Parameters:
player- the player- Returns:
- the cached permission data for the player
- See Also:
-
getMetaData
- Parameters:
player- the player- Returns:
- the cached meta data for the player
- See Also:
-