Package me.lucko.luckperms.fabric.mixin
Class ServerPlayerEntityMixin
java.lang.Object
me.lucko.luckperms.fabric.mixin.ServerPlayerEntityMixin
- All Implemented Interfaces:
MixinUser
Mixin into
ServerPlayerEntity to store LP caches and implement MixinUser.
This mixin is also temporarily used to implement our internal PlayerChangeWorldCallback, until a similar event is added to Fabric itself.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionme.lucko.luckperms.common.model.Userme.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> me.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> getQueryOptionsCache(FabricContextManager contextManager) Gets (or creates using the manager) the objectsQueryOptionsCache.abstract net.minecraft.server.world.ServerWorldnet.luckperms.api.util.TristatehasPermission(String permission) net.luckperms.api.util.TristatehasPermission(String permission, net.luckperms.api.query.QueryOptions queryOptions) voidinitializePermissions(me.lucko.luckperms.common.model.User user) Initialises permissions for this player using the givenUser.
-
Constructor Details
-
ServerPlayerEntityMixin
public ServerPlayerEntityMixin()
-
-
Method Details
-
getServerWorld
public abstract net.minecraft.server.world.ServerWorld getServerWorld() -
getLuckPermsUser
public me.lucko.luckperms.common.model.User getLuckPermsUser()- Specified by:
getLuckPermsUserin interfaceMixinUser
-
getQueryOptionsCache
public me.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> getQueryOptionsCache()- Specified by:
getQueryOptionsCachein interfaceMixinUser
-
getQueryOptionsCache
public me.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> getQueryOptionsCache(FabricContextManager contextManager) Description copied from interface:MixinUserGets (or creates using the manager) the objectsQueryOptionsCache.- Specified by:
getQueryOptionsCachein interfaceMixinUser- Parameters:
contextManager- the contextManager- Returns:
- the cache
-
initializePermissions
public void initializePermissions(me.lucko.luckperms.common.model.User user) Description copied from interface:MixinUserInitialises permissions for this player using the givenUser.- Specified by:
initializePermissionsin interfaceMixinUser- Parameters:
user- the user
-
hasPermission
- Specified by:
hasPermissionin interfaceMixinUser
-
hasPermission
public net.luckperms.api.util.Tristate hasPermission(String permission, net.luckperms.api.query.QueryOptions queryOptions) - Specified by:
hasPermissionin interfaceMixinUser
-
getOption
-
getOption
-