Ranks
Parties uses an internal permission system called "ranks".
Thanks to this you can decide which rank of the party can perform a specific actions, for example you can allow only moderators to invite players or rename party.
You can edit the ranks in
parties.yml
at the optionranks
.
By default there are three ranks: Leader, Moderator and Member.
Overview
This is an example of how ranks are configured:
ranks:
member:
level: 5
name: "Member"
chat: "&bMember"
default: true
permissions:
- party.sendmessage
- party.home
- party.desc
- party.motd
- party.claim
- party.teleport.accept
- party.teleport.deny
moderator:
level: 10
name: "Moderator"
chat: "&cModerator"
inheritence: member
permissions:
- party.ask.accept
- party.ask.deny
- party.invite
- party.kick
leader:
level: 20
name: "Leader"
chat: "&4&lLeader"
permissions:
- '*'
ID
ranks:
...
THIS_IS_THE_ID:
level: 5
...
The ID is used to define a rank and must be unique.
Level
...
level: 5
...
The level of a rank indicates how much important it is, higher is better.
There is only one leader and is always the highest rank.
Name and chat
...
name: "Member"
chat: "&bMember"
...
These strings can be changed into whatever you want, they do not must be the same name of the YAML node.
Name is used to refer the rank in commands.
Chat is used with the placeholder %player_rank_chat%
and should be "good looking" because used in chat.
Default
...
default: true
...
This options indicates if the rank is the default one. New members will automatically be in this rank.
There is only one default rank.
Permissions
...
permissions:
- 'a.permission'
- '-a.negated.permission'
- '*'
...
This is where you insert rank permissions, all listed below.
You can negate a permission by adding at the start -
.
With '*'
you can add ALL permissions.
Inheritence
...
inheritence: "member"
...
You can choose to inherit all permissions from another rank, so you do not have to rewrite them all.
Rank permissions
This is the full permissions list that you can use in ranks.
You can negate these permissions by inserting
-
before.
Basic rank permissions
Party basic permission | Description |
---|---|
party.ask.accept | Can accept ask requests |
party.ask.deny | Can deny ask requests |
party.claim | Allow access to /party claim |
party.home | Allow access to /party home |
party.invite | Allow access to /party invite |
party.kick | Allow access to /party kick |
party.sendmessage | Can send messages |
party.sendmessage.color | Send colored messages |
party.teleport.accept | Can accept teleport requests |
party.teleport.deny | Can accept teleport requests |
Edit rank permissions
Party edit permission | Description |
---|---|
party.edit.close | Can close the party |
party.edit.color | Can edit the party color |
party.edit.desc | Can edit the party description |
party.edit.follow | Can toggle the party follow |
party.edit.home | Can edit the party home |
party.edit.motd | Can edit the party motd |
party.edit.nickname.own | Can edit the own nickname |
party.edit.nickname.others | Can edit the others player nickname |
party.edit.open | Can open the party |
party.edit.password | Can edit the party password |
party.edit.protection | Can toggle friendly fire protection |
party.edit.tag | Can edit the party tag |
Admin rank permissions
Party admin permission | Description |
---|---|
party.admin.rank | Allow access to /party rank |
party.admin.rename | Allow access to /party rename |
party.admin.teleport | Allow access to /party teleport |
Extra rank permissions
Party extra permission | Description |
---|---|
party.warnondamage | Receive a message when there is a friendly fire attack |
party.autocommand | Enable autocommand feature |
Add a new rank
To add a new rank you just have to edit the ranks list like this:
ranks:
member:
level: 5
name: "Member"
chat: "&bMember"
default: true
permissions:
...
MYNEWRANK:
level: 8
name: "My new rank"
chat: "&bMy new rank"
inheritence: member
permissions:
- 'a.permission'
moderator:
level: 10
name: "Moderator"
chat: "&cModerator"
inheritence: MYNEWRANK
permissions:
...
...
As you can see, I have added the
inheritence
option to avoid rewriting all permissions and changed the moderator one too.
If something is not working, be sure you are correctly using spaces instead of tabs