-
-
Notifications
You must be signed in to change notification settings - Fork 295
Plugin Configuration
If you have successfully installed PEX you may want to know how to configure PEX.
First of all, some background info.
- You don't have to edit anything if you don't want to use the ModifyWorld and/or SQL backend
- If the previous argument matches your needs then skip right to the next section Commands
- After server restart, configuration files will be automatically deployed by plugin. Check plugins/PermissionsEx/ directory.
PEX Configuration File (top)
All configuration options of PEX stored in config.yml file. This is an example structure of a default config:
permissions:
backends:
file:
file: permissions.yml
backend: file
superperms:
enable-wildcards: true
disable-unmatched: false
enable: true
debug: false
compatibility-mode: false
createUserRecords: false
allowOps: false
debug: false
basedir: plugins\PermissionsEx
Configuration file description table (top)
Unless specified, possible values are true or false.
Adding any entries in the default config that are not already in there need to be in the proper format and indentation.
| Node | Description |
|---|---|
permissions.backends |
The backends node holds all the information used in permissions.backend (see the 'SQL backend configuration' or File backend configuration' section) |
permissions.backend |
Current selected backend. Possible values: file or sql
|
permissions.backends.p2compat.directory |
Directory to look in for old Permissions files. Used only when p2compat is enabled/installed during conversion. See Migrate from Permissions for more details. |
permissions.superperms |
The superperms node holds the settings for the super permissions support |
permissions.superperms.enable |
Enable/disable SuperPermissions support |
permissions.superperms.strict-mode |
Enable/disable strict mode. This mean all permission checks would be done only by PEX. Underlaying SuperPerms permissions would be completely ignored. |
permissions.superperms.parent-nodes |
Enable/disable parent node emulation. This will allow to use parent nodes defined by plugins. |
permissions.createUserRecords |
Automatically adds users to the permissions settings if they are not already listed and assigns them to the default group. |
permissions.allowOps |
Gives all permissions to ops as defined in the ops.txt file in the minecraft server directory |
permissions.debug |
Enables or disables PEX permissions debug mode |
permissions.basedir |
Plugin's base directory. Better don't touch this option, unless you know what are you doing. |
permissions.modifyworld.enable |
Enable/disable ModifyWorld false means disabled, true means enabled |
permissions.modifyworld.itemRestrictions |
If permissions.modifyworld.enable is set to true you can enable itemRestrictions to restrict item usage for a user/group |
permissions.informplayers.modifyworld |
Inform the player about modifyworld restriction. So if user make denied action he would be informed about it. |
permissions.informplayers.changes |
This option toggle informing about changing user/group permissions and options. So if you, for example, add permission, or change user group, user would get message "Your permissions has been changed!". |
Backends (top)
PEX provides two backends: file or sql.
File-backend is used by default.
You can switch the backend manually by using "permissions.backend" configuration node:
/pex backend file|sql (see Commands for further details)
backend: file
or
backend: sql
File backend configuration (top)
All permissions info is stored in the permissions.yml file (filename is also adjustable - permissions.backends.file.file param)
Here is an example permissions.yml:
users:
t3hk0d3:
group: default
permissions:
- permissions.*
worlds:
world:
permissions:
- test.*
group:
- testers
prefix: '&5[YARR]&f'
groups:
default:
default: true
permissions:
- -modifyworld.blocks.interact.23
- modifyworld.*
admins:
inheritance:
- default
permissions:
- example.permission
- -punish.noobs
options:
test.test: '100500'
worlds:
nether:
permissions:
- nocheat.fly
prefix: '&7[ADMIN FROM HELL]'
testers:
inheritance:
- admins
options:
test.test: '9000'
worlds:
nether:
inheritance:
- world
This file layout should be self-explanatory if you have ever used the old Permissions 2.x or 3.x plugins.
PEX reads the file in a 'top to bottom' manner when checking if a user has the correct permission to do something. Similar to a network firewall, once it finds a node that matches what it is looking for, it stops searching.
So using the above sample config, if a player tried to open a dispenser (data value 23), the first match would be -modifyworld.blocks.interact.23, which would disallow access.
If the same player tried to open a chest (data value 54), the modifyworld.* would match and the player would be allowed.
However, if the two lines were reversed (modifyworld. came before the -modifyworld.blocks.interact.23), the player would be allowed to open the dispenser as modifyworld. is the first line to satisfy the permissions search PEX has done.
There can only be one default group set to true! All player names and group names are case-sensitive.
SQL backend configuration (top)
SQL backend configuration nodes are inside permissions.backend.sql
| Node | Description |
|---|---|
| driver | Database driver. (It can also be driver class name) Possible values: mysql, sqlite, or org.sqlite.JDBC.Currently only mysql and sqlite are fully supported or tested. |
| uri | Database connection string (the DSN) is very driver specific. For example, MySQL would be like this: mysql://<hostname>/<database>
|
| user | Database user name. If database doesn't require a username you can just remove this option. |
| password | Database password for specified user. If database doesn't require a username you can just remove this option. |
MySQL (top)
SQL Backend configuration example using MySQL:
permissions:
basedir: plugins/PermissionsEx
backend: sql
backends:
sql:
driver: mysql
uri: mysql://localhost/databasename
user: username
password: password
You may need to change the hostname, database name, database username and password. In many cases, the hostname is "localhost" (assuming that the database server is on the same machine as the minecraft server. Check with your server host or network/systems admin for confirmation).
PEX will automatically create the database tables and initial groups and permissions on startup if they are not already present.
Do not delete the initial data if you are not 100% sure of what you are doing.
SQLite Backend Configuration (top)
SQLite configuration is almost the same as mentioned in the SQL section, but there are a few differences:
You need to set "permissions.backends.sql.driver" to "sqlite"
and "permissions.backends.sql.uri" to something like "sqlite:databasename".
permissions:
basedir: plugins/PermissionsEx
backend: sql
backends:
sql:
driver: sqlite
uri: sqlite:databasename
user: username
password: password
After server restart/reload in your minecraft server directory (or where your CraftBukkit jar is located), a file named "<databasename>.db" will be created. Do not remove this file accidentally, it is the database file.
| Previous: Installation, Next: Basic Permissions Setup |