Plugin Configuration - PEXPlugins/PermissionsEx GitHub Wiki
Installation (top)
- Any version of PermissionsEx that is 1.21 or newer requires a version of Bukkit based on at least Minecraft 1.7.9
- Any earlier version of Bukkit must use PEX 1.20.4
Download a compatible version of PermissionsEx from BukkitDev.
BukkitDev versions are generally stable. Development builds are available and will be provided by the PEX developers if there is an occasion where an urgent bugfix is needed or major changes are in a testing phase.
PEX will automatically create the default configuration files when you start your server. You don't have to edit those generated config files unless you want to use the MySQL connector or you want to adjust plugin settings. Continue reading if you want to customize further, otherwise continue to the Commands section.
Please make sure that no other permission plugins are present or you will run into problems.
PEX Configuration File (top)
All configuration options of PEX are stored in config.yml file. Here is an example:
permissions:
backends: <- Backend Definition Section
file: <- File Based Backend Section
file: permissions.yml <- File Name To Use
backend: file <- Backend To Use On Start
createUserRecords: false <- Other Settings
allowOps: false
debug: false
user-add-groups-last: false
basedir: plugins/PermissionsEx <- Directory Name To Use (only for file backend)
informplayers:
changes: false <- Whether to notify players when they have their permissions changed
multiserver:
use-netevents: true
updater: true
alwaysUpdate: false
Your config.yml may not look the same, and in fact, might be missing some of the above lines. This is normal, and you do not need to add them unless you want to change one of the settings (listed below) from the default.
Configuration file description table (top)
Unless specified, possible values are true
or false
.
Make sure, if you add configuration directives that are not already included, that the proper formatting is used! See PEX Basics, PEX File Format (YAML) Section for details!
Node | Description |
---|---|
permissions.backends |
Contains information for the permissions backend settings (see the [[backends |
permissions.backend |
Default backend. Possible values depend on what is defined in permissions.backends . |
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 at startup. See the [[Commands, Utility Commands |
permissions.user-add-groups-last |
When set to true, /pex user <user> group add <group> will add <group> to the end of a user's permissions list (lowest priority unless group weight is used). Defaults to false, meaning groups are added to users in the highest priority, at the front of the list. |
permissions.basedir |
Plugin's base directory. Leave this one alone unless you know what are you doing. |
multiserver.use-netevents |
Determines whether integration with NetEvents is enabled (only has an effect when the NetEvents plugin is installed) |
updater |
Configures whether the updater is enabled. Defaults to true |
Backends (top)
PEX provides two backends: file or sql. The file backend is used by default.
The active backend can be switched "on-the-fly" without a server restart by using the pex backend
command and specifying the backend to use, as defined in the backends section of the config.yml file. See Commands for further details and the permissions node.
File backend configuration (top)
All permissions info is stored in the filename specified in the file backend section of the config file.
SQL backend configuration (top)
WARNING: The SQL backend has one limitation at the time of this writing (1/2/2013). The max length of a node is 200 characters long by default. Anything longer will be truncated in the database and will not generate an error. To work around this limitation, you can:
- Edit the SQL database to allow for longer strings (not recommended)
- Split longer lines into separate ones that are under 200 characters
(Thanks goes to Bukkit forum member s32ialx for finding this limitation and reporting it)
SQL backend configuration nodes are inside the permissions.backend.sql
node
Node | Description |
---|---|
uri |
Database connection string, AKA the DSN. Please note that the DSN is driver specific. For example, MySQL would be like this: mysql://<hostname>/<database>
|
user |
Database user name. If the database doesn't require a username, this can be removed. |
password |
Database password for specified user. If database doesn't require a password, this is optional |
MySQL (top)
SQL Backend configuration example using MySQL:
permissions:
backend: sql
backends:
sql:
uri: mysql://localhost/databasename
user: username
password: password
Change the hostname, database name, database username and password as needed to match your configuration. 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. When ready, import data from the file backend by running the command pex import file
Do not delete the initial data if you are not 100% sure of what you are doing.
Additionally one can change the default table names with alias
. Example:
permissions:
backends:
sql:
uri: mysql://192.168.5.4/demo
password: password
user: demo
aliases:
permissions: pex_permissions
permissions_inheritance: pex_inheritance
permissions_entity: pex_entity
SQLite Backend Configuration (top)
SQLite configuration is almost the same as the SQL section, with 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:
uri: sqlite:plugins/PermissionsEx/permissions.db
user: username
password: password
After server restart/reload, a file named permissions.db
will be created in PermissionsEx plugin folder. Do not remove this file, it is the database file.
Previous: PEX Basics, Next: Migration and UUIDs |