Class PortalPermissionHelper
java.lang.Object
org.sgrewritten.stargate.util.portal.PortalPermissionHelper
A permission helper for dealing with portal permissions
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateCustomNetworkPermission
(String permissionRootNode, String networkName) Generates the permission required for creating a custom networkgetAccessPermissions
(RealPortal portal, org.bukkit.entity.Entity actor) Generate access permissionsgetCreatePermissions
(RealPortal portal, org.bukkit.entity.Entity actor) Generate create permissionsgetDestroyPermissions
(RealPortal portal, org.bukkit.entity.Entity actor) Generate destroy permissionsgetOpenPermissions
(RealPortal entrance, Portal exit, org.bukkit.entity.Entity actor) Generate open permissionsgetTeleportPermissions
(RealPortal entrance, org.bukkit.entity.Entity target) Generate teleport permissions
-
Method Details
-
getAccessPermissions
Generate access permissions- Parameters:
portal
-The portal to access
actor
-The entity to get related permissions
- Returns:
A list with related permissions
-
getCreatePermissions
Generate create permissions- Parameters:
portal
-The portal to create
actor
-The entity to get related permissions
- Returns:
A list with related permissions
-
getDestroyPermissions
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
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
-