You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this guide, you'll learn how to manage permission nodes in your Hytale plugin.
13
+
In this guide, you'll learn how to manage permission nodes and groups in your Hytale plugin.
12
14
13
15
## The `PermissionsModule` class
14
16
15
-
The `PermissionsModule` class is responsible for managing permission nodes in your plugin. It provides methods to check, grant and revoke permissions for players.
17
+
The `PermissionsModule` class is responsible for managing permission nodes and groups in your plugin. It provides methods to check, grant and revoke permissions and groups for players. It allows the following operations
18
+
- Add permissions to user
19
+
- Remove permissions from user
20
+
- Add permissions to group (this also creates the group if it doesn't exist)
21
+
- Remove permissions from group
22
+
- Add user to group
23
+
- Remove user from group
24
+
- List all groups for a user
25
+
- Check if a user has a permission (it checks both user and group permissions for the given player UUID)
Then we just implement the required methods using a database implementation. To force our plugin to use this new provider we just need to add to the provider list our fresh DatabasePermissionProvider.
0 commit comments