Interface ISecurityService

All Superinterfaces:
IGridService

public interface ISecurityService extends IGridService
Provides facilities around controlling player access to a grid.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
    hasPermission(int playerId, SecurityPermissions perm)
    Check if a player has the specified permissions on this grid.
    boolean
    hasPermission(net.minecraft.world.entity.player.Player player, SecurityPermissions perm)
    Check if a player has the specified permissions on this grid.
    boolean
     
  • Method Details

    • isAvailable

      boolean isAvailable()
      Returns:
      true if exactly one node implementing the ISecurityProvider node service is connected to the grid.
    • hasPermission

      boolean hasPermission(net.minecraft.world.entity.player.Player player, SecurityPermissions perm)
      Check if a player has the specified permissions on this grid.
      Parameters:
      player - The connected player.
      perm - The permission to check.
      Returns:
      True if the player has permission.
    • hasPermission

      boolean hasPermission(int playerId, SecurityPermissions perm)
      Check if a player has the specified permissions on this grid.

      This overload can be used to check permissions for a player who is not currently connected.

      Parameters:
      playerId - The ID of the player to check for. See IPlayerRegistry.
      perm - The permission to check.
      Returns:
      True if the player has permission.
    • getOwner

      int getOwner()
      Returns:
      PlayerID of the admin, or owner, this is the person who placed the security block.