Class ServerPlayerEntityMixin

java.lang.Object
me.lucko.luckperms.fabric.mixin.ServerPlayerEntityMixin
All Implemented Interfaces:
MixinUser

public abstract class ServerPlayerEntityMixin extends Object implements 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 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:
      getLuckPermsUser in interface MixinUser
    • getQueryOptionsCache

      public me.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> getQueryOptionsCache()
      Specified by:
      getQueryOptionsCache in interface MixinUser
    • getQueryOptionsCache

      public me.lucko.luckperms.common.context.manager.QueryOptionsCache<net.minecraft.server.network.ServerPlayerEntity> getQueryOptionsCache(FabricContextManager contextManager)
      Description copied from interface: MixinUser
      Gets (or creates using the manager) the objects QueryOptionsCache.
      Specified by:
      getQueryOptionsCache in interface MixinUser
      Parameters:
      contextManager - the contextManager
      Returns:
      the cache
    • initializePermissions

      public void initializePermissions(me.lucko.luckperms.common.model.User user)
      Description copied from interface: MixinUser
      Initialises permissions for this player using the given User.
      Specified by:
      initializePermissions in interface MixinUser
      Parameters:
      user - the user
    • hasPermission

      public net.luckperms.api.util.Tristate hasPermission(String permission)
      Specified by:
      hasPermission in interface MixinUser
    • hasPermission

      public net.luckperms.api.util.Tristate hasPermission(String permission, net.luckperms.api.query.QueryOptions queryOptions)
      Specified by:
      hasPermission in interface MixinUser
    • getOption

      public String getOption(String key)
      Specified by:
      getOption in interface MixinUser
    • getOption

      public String getOption(String key, net.luckperms.api.query.QueryOptions queryOptions)
      Specified by:
      getOption in interface MixinUser