Package org.sgrewritten.stargate.manager
Class UnrestrictedPermissionManager
java.lang.Object
org.sgrewritten.stargate.manager.UnrestrictedPermissionManager
- All Implemented Interfaces:
PermissionManager
Does no permission checks, will always give permission to everything
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateInNetwork(String network, NetworkType type) Checks whether the entity is allowed to create stargates in the given networkGets the deny-message to display if a previous permission check returned falsebooleanhasAccessPermission(RealPortal portal) Check if entity has permission to access portalbooleanhasCreatePermissions(RealPortal portal) Check if entity has permission to create portalbooleanhasDestroyPermissions(RealPortal portal) Check if entity has permission to destroy portalbooleanhasOpenPermissions(RealPortal entrance, Portal exit) Check if entity has permission to open portalbooleanhasTeleportPermissions(RealPortal entrance) Check if the entity has permission to teleport through portalreturnDisallowedFlags(Set<PortalFlag> flags) Gets all flags usable by the entity
-
Constructor Details
-
UnrestrictedPermissionManager
public UnrestrictedPermissionManager()
-
-
Method Details
-
returnDisallowedFlags
Description copied from interface:PermissionManagerGets all flags usable by the entity- Specified by:
returnDisallowedFlagsin interfacePermissionManager- Parameters:
flags-The flags to check if the entity can use
- Returns:
The flags usable by the entity
-
hasAccessPermission
Description copied from interface:PermissionManagerCheck if entity has permission to access portal- Specified by:
hasAccessPermissionin interfacePermissionManager- Parameters:
portal-The portal to be accessed
- Returns:
If entity has permission
-
hasCreatePermissions
Description copied from interface:PermissionManagerCheck if entity has permission to create portal- Specified by:
hasCreatePermissionsin interfacePermissionManager- Parameters:
portal-The portal to be created
- Returns:
If entity has permission
-
hasDestroyPermissions
Description copied from interface:PermissionManagerCheck if entity has permission to destroy portal- Specified by:
hasDestroyPermissionsin interfacePermissionManager- Parameters:
portal-The portal to be destroyed
- Returns:
If entity has permission
-
hasOpenPermissions
Description copied from interface:PermissionManagerCheck if entity has permission to open portal- Specified by:
hasOpenPermissionsin interfacePermissionManager- Parameters:
entrance-The portal the entity is opening
exit-The destination portal
- Returns:
If entity has permission
-
hasTeleportPermissions
Description copied from interface:PermissionManagerCheck if the entity has permission to teleport through portal- Specified by:
hasTeleportPermissionsin interfacePermissionManager- Parameters:
entrance-The portal the entity is entering
- Returns:
If entity has permission
-
canCreateInNetwork
Description copied from interface:PermissionManagerChecks whether the entity is allowed to create stargates in the given network- Specified by:
canCreateInNetworkin interfacePermissionManager- 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
Description copied from interface:PermissionManagerGets the deny-message to display if a previous permission check returned false- Specified by:
getDenyMessagein interfacePermissionManager- Returns:
The message to display when telling the player the action has been denied
-