Interface PermissionManager

All Known Implementing Classes:
StargatePermissionManager, UnrestrictedPermissionManager

public interface PermissionManager
An interface describing a permission manager
  • Method Details

    • returnDisallowedFlags

      Set<PortalFlag> returnDisallowedFlags(Set<PortalFlag> flags)
      Gets all flags usable by the entity
      Parameters:
      flags -

      The flags to check if the entity can use

      Returns:

      The flags usable by the entity

    • hasAccessPermission

      boolean hasAccessPermission(RealPortal portal)
      Check if entity has permission to access portal
      Parameters:
      portal -

      The portal to be accessed

      Returns:

      If entity has permission

    • hasCreatePermissions

      boolean hasCreatePermissions(RealPortal portal)
      Check if entity has permission to create portal
      Parameters:
      portal -

      The portal to be created

      Returns:

      If entity has permission

    • hasDestroyPermissions

      boolean hasDestroyPermissions(RealPortal portal)
      Check if entity has permission to destroy portal
      Parameters:
      portal -

      The portal to be destroyed

      Returns:

      If entity has permission

    • hasOpenPermissions

      boolean hasOpenPermissions(RealPortal entrance, Portal exit)
      Check if entity has permission to open portal
      Parameters:
      entrance -

      The portal the entity is opening

      exit -

      The destination portal

      Returns:

      If entity has permission

    • hasTeleportPermissions

      boolean hasTeleportPermissions(RealPortal entrance)
      Check if the entity has permission to teleport through portal
      Parameters:
      entrance -

      The portal the entity is entering

      Returns:

      If entity has permission

    • canCreateInNetwork

      boolean canCreateInNetwork(String network, NetworkType type)
      Checks whether the entity is allowed to create stargates in the given network
      Parameters:
      network -

      The name of the network to check

      type -

      The type if the network to check

      Returns:

      True if the entity is allowed to create stargates

    • getDenyMessage

      String getDenyMessage()
      Gets the deny-message to display if a previous permission check returned false
      Returns:

      The message to display when telling the player the action has been denied