- PEX Configuration File
- Configuration File Description Table
- 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.
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.
Unless specified, possible values are
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!
||Contains information for the permissions backend settings (see the [[backends|
||Default backend. Possible values depend on what is defined in
||Gives all permissions to ops as defined in the
||Enables or disables PEX permissions debug mode at startup. See the [[Commands, Utility Commands|
||When set to true,
||Plugin's base directory. Leave this one alone unless you know what are you doing.|
||Determines whether integration with NetEvents is enabled (only has an effect when the NetEvents plugin is installed)|
||Configures whether the updater is enabled. Defaults to true|
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.
All permissions info is stored in the filename specified in the file backend section of the config file.
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
||Database connection string, AKA the DSN. Please note that the DSN is driver specific. For example, MySQL would be like this:
||Database user name. If the database doesn't require a username, this can be removed.|
||Database password for specified user. If database doesn't require a password, this is optional|
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
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 configuration is almost the same as the SQL section, with a few differences:
You need to set
permissions.backends.sql.uri to something like
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|