Skip to content

Configuring Race Permissions

Redned edited this page Feb 15, 2020 · 2 revisions

Configuring Race Permissions

In order for the tutorial below to work, you MUST have a permission plugin installed as well as Vault.

In this section, you will be learning about how to configure the permissions that races can obtain by just having the race selected, or if you're interested in getting into the more complex part, permissions obtained by leveling up or purchasing skilltree elements. However this page only covers how to add or revoke permissions determined by race. If you want to learn more about the other part, refer to the pages below.

For this tutorial, we will be picking up from the Configuring Race Attributes page just for consistency reasons. Adding the permission part is just as easy as the rest! With this feature, you are both able to add and remove permissions from the player.

race:
    name: Werewolf
    max-level: 30
    require-unlock: true
    gui:
        slot: 29
        icon:
            type: player_head
            owner: Werewolf
            display-name: "&cWerewolf &7| &aUnlocked"
            lore:
            - '&7At night, a dark curse falls upon'
            - '&7this race turning it into a vicious'
            - '&7werewolf!'
        icon-selected:
            type: player_head
            owner: Werewolf
            display-name: "&cWerewolf &7| &eSelected"
            lore:
            - '&7At night, a dark curse falls upon'
            - '&7this race turning it into a vicious'
            - '&7werewolf!'
            enchants:
            - unbreaking 1
            item-flags:
            - hide_enchants
        icon-locked:
            type: skeleton_skull
            display-name: "&c??? &7| &cLocked"
            lore:
            - '&7Defeat the Feral Lycan to'
            - '&7unlock this race.'
    levels:
        1: # The first level
            xp: 200 # How much experience you need to level up
            skillpoints: 1 # How many skillpoints you get for leveling up
        2: 
            xp: 250
            skillpoints: 1
        3: 
            xp: 275 # You don't need to define skillpoints either, but you MUST define how much xp it takes for you to level up.
        4: 
            xp: 300
            skillpoints: 1
        5:
            xp: 350
            skillpoints: 2
        # You can define as many levels as you want below
    attributes:
        generic-max-health: 25
        generic-armor: 5
        generic-attack-speed: 10
        max-mana: 250 # MagicSpells mana
    permissions:
    - essentials.sethome.multiple.werewolf
    - essentials.nick
    - essentials.tpa
    - ^essentials.tpahere # Add ^ before the permission to remove it
    - ^essentials.vanish 

And that's it! Permissions are now added! Refer to the pages below for more information on adding permissions for levels and skilltrees.

How to Customize Attributes Even More: