Interface IPlayerPermissionSystemAPI


public interface IPlayerPermissionSystemAPI
The interface to be overridden by addons that wish to implement additional permission systems to be used by Open Parties and Claims.

Player permission system implementations must be registered in IPlayerPermissionSystemRegisterAPI.

  • Method Details

    • getIntPermission

      @Nonnull OptionalInt getIntPermission(@Nonnull net.minecraft.server.level.ServerPlayer player, @Nonnull IPermissionNodeAPI<Integer> node)
      Gets the value of an integer permission for a specified player.
      Parameters:
      player - the player, not null
      node - the node of the permission from UsedPermissionNodes, not null
      Returns:
      the OptionalInt for the int value of the permission, not null
    • getPermission

      boolean getPermission(@Nonnull net.minecraft.server.level.ServerPlayer player, @Nonnull IPermissionNodeAPI<Boolean> node)
      Gets the value of a boolean permission for a specified player.
      Parameters:
      player - the player, not null
      node - the node of the permission from UsedPermissionNodes, not null
      Returns:
      the boolean value of the permission, false if it doesn't exist
    • getPermissionTyped

      @Nonnull <T> Optional<T> getPermissionTyped(@Nonnull net.minecraft.server.level.ServerPlayer player, @Nonnull IPermissionNodeAPI<T> node)
      Gets the value of a permission with a specific value type.

      This isn't used by the mod as of typing this, but could be in the future.

      Type Parameters:
      T - the permission value type
      Parameters:
      player - the player, not null
      node - the node of the permission from UsedPermissionNodes, not null
      Returns:
      the Optional for the value of the permission, not null