Permissions
GrayCore has its own permission system, stored in PostgreSQL and applied on every game server and on the proxy.
Groups
- A group has a name, a priority, a prefix, a suffix and a list of permissions.
- A player gets the permissions of all their groups plus their own.
- Their main group, whose prefix and suffix are shown, is the one with the lowest priority number.
- Everyone is in the
defaultgroup. - The
admingroup is created on the first start of a Paper server, with every permission GrayCore checks (see Commands and permissions). A module adds its own admin permissions to it when the group is created; an existing group needs them added by hand. - A group can be given for a while: the assignment ends on its own.
Changes are picked up by every server and by the proxy within 15 seconds.
/grayperms
Alias /gperms, permission graycore.grayperms.admin. It works from the console too.
| Command | What it does |
|---|---|
/grayperms group list | The groups. |
/grayperms group info <group> | A group's priority, prefix, suffix and permissions. |
/grayperms group create <group> [priority] | Creates a group (priority 100 if not given). |
/grayperms group delete <group> | Deletes a group. |
/grayperms group add-permission <group> <permission> | Gives a permission to a group. |
/grayperms group remove-permission <group> <permission> | Takes it back. |
/grayperms group prefix <group> [prefix] | Sets the prefix (none to clear it), in MiniMessage. |
/grayperms group suffix <group> [suffix] | Same for the suffix. |
/grayperms group priority <group> <priority> | Changes the priority. |
/grayperms player info <player> | A player's groups and permissions. |
/grayperms player add-group <player> <group> [duration] | Puts a player in a group, for duration seconds or for good. |
/grayperms player remove-group <player> <group> | Takes them out. |
/grayperms player add-permission <player> <permission> | Gives a permission to one player. |
/grayperms player remove-permission <player> <permission> | Takes it back. |
For example, to become admin on a fresh network, from a game server's console:
grayperms player add-group YourName admin