-
-
Notifications
You must be signed in to change notification settings - Fork 295
Basic Permissions Setup
- Install (Installation) and configure (Plugin Configuration) PermissionsEx (Make sure to read the section about permission order in the Plugin Configuration section)
-
OPTIONAL: Activate ModifyWorld by editing plugins/Modifyworld/config.yml (set
enable: true
) - Start your server instance
- Via console create a group called "Admins". Add yourself to "Admins" group and add "*" permission (see Commands section))
- Start your Minecraft client and connect to your server
- Open up the Commands section in a seperate window
- Read the "Basic PermissionsEx Setup example"
- Setup a basic and simple permissions infrastructure
- Create additional groups: Member, VIP, Moderator
- "Default" is able to chat but cannot modify anything and doesn't have a prefix
- "Member" is Trusted group. Those players can modify the world and have a colored prefix "&0(&8M&7ember&0)&7 "
- "VIP" inherits "Member". Those players will have a prefix "&0(&eVIP&0)&7 ". You can add special attributes or permissions to this Group if you like.
- "Moderator" is a separate group. This group has its own permissions and does not inherit any group. This prevents you from doing stuff like "Members" shouldn't be able to use or have happen, but "Moderators" should. (e.g.
-modifyworld.mobtarget.monster.creeper
) - "Admins" are Superusers. They get a fancy prefix like "&0(&4Admins&0)&7 ".
-
OPTIONAL: Remove
modifyworld.*
permission from "default" group -
OPTIONAL: Add
modifyworld.chat
permission to "default" group - Testing your environment
Create the "Admins" group via the console with pex group Admins create
, then add "*" permission to this group with pex group Admins add "*"
. Add yourself to this group with pex user YourPlayerName group set Admins
as well.
Now connect to your server and create groups Member, VIP and Moderator.
Note: The following assumes that you are entering the commands from in-game. All these commands can also be used from the console, just remove the / at the beginning of the line.
/pex group Member create
/pex group VIP create Member
/pex group Moderator create
Now we are setting ranks (Ranks (Promotion and Demotion)) to those groups to set the Rank order to
Member -> VIP -> Moderator -> Admins
/pex group default set rank 1000
/pex group Member set rank 900
/pex group VIP set rank 800
/pex group Moderator set rank 100
/pex group Admins set rank 0
Rank 100 is now the highest promotion status. Be aware that you can't promote a user to your own group (in this example, Admins, rank 0). This will prevent you from accidentally promoting a user to Admins. If you wish to set his/her group to Admins then set it directly through command /pex user PlayerName group set Admins
.
/pex group Member prefix "&0(&8M&7ember&0)&7 "
/pex group VIP prefix "&0(&eVIP&0)&7 "
/pex group Moderator prefix "&0(&1Moderator&0)&7 "
/pex group Admins prefix "&0(&4Admins&0)&7 "
If you not already have done so remove defaults modifyworld.* permission. If you have not enabled ModifyWorld, the modifyworld.*
lines can be skipped.
/pex group default remove modifyworld.*
/pex group default add modifyworld.chat
/pex group Member add modifyworld.*
/pex group VIP add modifyworld.*
/pex group VIP add "-modifyworld.mobtarget.monster.creeper"
/pex group Moderator add "modifyworld.*"
/pex group Moderator add "-modifyworld.mobtarget.*"
/pex group Admins add "*"
/pex group Admins add "-modifyworld.mobtarget.*"
Now test your environment and switch to your server console
/pex user YourPlayerName group set default
- Check if you can chat
- Check if the right prefix is shown in the chat window
- Try to destroy a block
- Run into a creeper! (Don't be afraid, it will not be able to target you, nor can you harm it)
/pex user YourPlayerName group set Member
- Check if you can chat
- Check if the right prefix is shown in chat window
- Check if you can modify the world like breaking a block (outside your spawn area ^^)
/pex user YourPlayerName group set VIP
- Check if you can chat
- Check if the right prefix is shown in chat window
- Check if you can modify the world like breaking a block (outside your spawn area ^^)
- Run into a creeper! (Don't be afraid, it will not be able to target you, but you are able to damage them. How unfair! :3)
- Time to "pay-back" those creepers for destroying your house countless times! ;)
/pex user YourPlayerName group set Admins
- Check if you can chat
- Check if the right prefix is shown in chat window
- Check if you can modify the world like breaking a block (outside your spawn area ^^)
- Check if you are now able to do everything
- Check if you will be targeted by any mobs (shouldn't work ^^)
Note: For this step, you will be creating a "virtual" user. Or have a friend join the server and use them as the test subject (It's for Science!)
/pex user AnotherPlayer group set default
- Check if the promotion/demotion queue is working
- Execute in-game
/pex promote AnotherPlayer
as long as pex tells you "cannot promote AnotherPlayer" (you shouldn't be able to promote em to your group Admins), check rankorder - Execute in-game
/pex demote AnotherPlayer
until they are in the default group, check rankorder - If the player was virtual, remove them afterwards with
/pex user AnotherPlayer delete
if you so desire.
- If the player was real, check every group to verify that it is working as it should (see the Goals list)
For reference, following the example above will result in the following permissions.yml file. If you use this as an example for making your permissions file, make note of the indenting and capitalization of the various header names:
groups: default: default: true options: rank: '1000' permissions: - modifyworld.chat Member: prefix: '&0(&8M&7ember&0)&7 ' permissions: - modifyworld.* options: rank: '900' VIP: prefix: '&0(&eVIP&0)&7 ' permissions: - -modifyworld.mobtarget.monster.creeper - modifyworld.* options: rank: '800' Moderator: prefix: '&0(&1Moderator&0)&7 ' permissions: - -modifyworld.mobtarget.* - modifyworld.* options: rank: '100' Admins: prefix: '&0(&4Admins&0)&7 ' permissions: - -modifyworld.mobtarget.* - '*' options: rank: '0' users: AnotherPlayer: group: - default YourPlayerName: group: - Admins
And this is how the file looks to PEX after being parsed. Use an on-line YAML checker to verify your permissions file looks similar. If it does not, PEX will not work as expected and may throw all kinds of exception errors!
{ "users": { "AnotherPlayer": { "group": [ "default" ] }, "YourPlayerName": { "group": [ "Admins" ] } }, "groups": { "default": { "default": true, "options": { "rank": "1000" }, "permissions": [ "modifyworld.chat" ] }, "Member": { "prefix": "&0(&8M&7ember&0)&7 ", "options": { "rank": "900" }, "permissions": [ "modifyworld.*" ] }, "VIP": { "prefix": "&0(&eVIP&0)&7 ", "options": { "rank": "800" }, "permissions": [ "-modifyworld.mobtarget.monster.creeper", "modifyworld.*" ] }, "Moderator": { "prefix": "&0(&1Moderator&0)&7 ", "options": { "rank": "100" }, "permissions": [ "-modifyworld.mobtarget.*", "modifyworld.*" ] }, "Admins": { "prefix": "&0(&4Admins&0)&7 ", "options": { "rank": "0" }, "permissions": [ "-modifyworld.mobtarget.*", "*" ] } } }
This concludes this tutorial. You may want to continue now with the Advanced Permissions Setup example where you will learn how to subgroup your groups.
If you have any further questions that isn't included in the next section feel free to ask in #permissionsex on esper.net
Previous: Plugin Configuration, Next: Advanced Permissions Setup |