RoleRestrictionsApi
Allows to add and check role restrictions (in the sense of structural typing) to a compartment instance.
Value members
Abstract methods
Add a role restriction between the given player type A and role type B.
Add a role restriction between the given player type A and role type B.
- Type Params
- A
the player type
- B
the role type
Removes all role restriction for a player of type A.
Removes all role restriction for a player of type A.
- Type Params
- A
the player type
Replaces a role restriction for a player of type A with a new role restriction between the given player type A and role type B.
Replaces a role restriction for a player of type A with a new role restriction between the given player type A and role type B.
- Type Params
- A
the player type
- B
the role type
Checks all role restriction between the given player and a role type. Will throw a RuntimeException if a restriction is violated!
Checks all role restriction between the given player and a role type. Will throw a RuntimeException if a restriction is violated!
- Value Params
- player
the player instance to check
- role
the role type to check