Package appeng.api.networking.security
Interface ISecurityService
- All Superinterfaces:
IGridService
Provides facilities around controlling player access to a grid.
-
Method Summary
Modifier and TypeMethodDescriptionintgetOwner()booleanhasPermission(int playerId, SecurityPermissions perm) Check if a player has the specified permissions on this grid.booleanhasPermission(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
ISecurityProvidernode service is connected to the grid.
-
hasPermission
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
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. SeeIPlayerRegistry.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.
-