Class PortalPermissionHelper

java.lang.Object
org.sgrewritten.stargate.util.portal.PortalPermissionHelper

public final class PortalPermissionHelper extends Object
A permission helper for dealing with portal permissions
  • Method Details

    • getAccessPermissions

      public static List<String> getAccessPermissions(RealPortal portal, org.bukkit.entity.Entity actor)
      Generate access permissions
      Parameters:
      portal -

      The portal to access

      actor -

      The entity to get related permissions

      Returns:

      A list with related permissions

    • getCreatePermissions

      public static List<String> getCreatePermissions(RealPortal portal, org.bukkit.entity.Entity actor)
      Generate create permissions
      Parameters:
      portal -

      The portal to create

      actor -

      The entity to get related permissions

      Returns:

      A list with related permissions

    • getDestroyPermissions

      public static List<String> getDestroyPermissions(RealPortal portal, org.bukkit.entity.Entity actor)
      Generate destroy permissions
      Parameters:
      portal -

      The portal to destroy

      actor -

      The entity to get related permissions

      Returns:

      A list with related permissions

    • getOpenPermissions

      public static List<String> getOpenPermissions(RealPortal entrance, Portal exit, org.bukkit.entity.Entity actor)
      Generate open permissions
      Parameters:
      entrance -

      The portal to open

      exit -

      The destination portal

      actor -

      the entity to check permissions for

      Returns:

      A list with related permissions

    • getTeleportPermissions

      public static List<String> getTeleportPermissions(RealPortal entrance, org.bukkit.entity.Entity target)
      Generate teleport permissions
      Parameters:
      entrance -

      The portal to teleport from

      target -

      The entity to check permissions on

      Returns:

      A list with related permissions

    • generateCustomNetworkPermission

      public static String generateCustomNetworkPermission(String permissionRootNode, String networkName)
      Generates the permission required for creating a custom network
      Parameters:
      permissionRootNode -

      The root node (stargate/sg) of any generated permission

      networkName -

      The name of the custom network

      Returns:

      The permission required for creating the network