Solved Lower Ranks Overriding Display for Higher Ranks in PEX/EssentialsChatX

Discussion in 'Plugin Help/Development/Requests' started by CombattxKillla, Jan 15, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    CombattxKillla

    Thus far, I've configured my groups (or ranks) within PermissionsEx. In my EssentialsX configuration, I've used group-based formatting to display a different tag based on the user's group. Below is said group formatting:

    Code:
    group-formats:
        Administrator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&cA&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Chief Moderator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&1CM&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Moderator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&1M&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Ultimate Donator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&k[&eUltimate Donator&7&k]&7 {DISPLAYNAME} &8>> &7{MESSAGE}'
        Grand Donator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&6GD&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Donator: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&bD&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Rank III: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&3III&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Rank II: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&aII&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Rank I: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&fI&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
        Owner: '&7[&7{factions_relcolor}{factions_roleprefix}{factions_name}&7]&7{jobs}&7[&4O&7] {DISPLAYNAME} &8>> &7{MESSAGE}'
    In game, everything works fine when you're only assigned to one group. When you're assigned to two groups, such as the Owner group and Rank II group for example, the [II] prefix assigned to the Rank II group overrides the [O] prefix assigned to the Owner group. The following image illustrates the issue:

    [​IMG]

    Any ideas on why this might be happening?

    permissions.yml:
    Code:
    groups:
      Owner:
        options:
          default: false
          rank: '1'
        permissions:
        - '*'
        - modifyworld.*
      Administrator:
        options:
          default: false
          rank: '2'
        permissions:
        - '*'
      Chief Moderator:
        options:
          default: false
          rank: '3'
        inheritance:
        - Moderator
        permissions:
        - modifyworld.*
        - essentials.kick.exempt
        - essentials.gc
        - essentials.invsee.modify
        - essentials.enderchest.modify
        - essentials.clearinventory.others
        - essentials.broadcast
        - essentials.ban
        - essentials.ban.offline
        - essentials.banip
      Moderator:
        options:
          default: false
          rank: '4'
        inheritance:
        - Rank III
        permissions:
        - modifyworld.*
        - essentials.joinfullserver
        - essentials.chat.color
        - essentials.chat.format
        - essentials.warps.ModLounge
        - essentials.tp
        - essentials.tp.others
        - essentials.jump
        - essentials.fly
        - essentials.vanish
        - essentials.togglejail
        - essentials.togglejail.offline
        - essentials.tempban
        - essentials.tempban.offline
        - essentials.mute
        - essentials.mute.notify
        - essentials.mute.offline
        - essentials.kick
        - essentials.kick.notify
        - essentials.ban.notify
        - essentials.invsee
        - essentials.whois
        - essentials.nick
        - essentials.nick.*
        - essentials.helpop.receive
        - essentials.god
        - essentials.workbench
      Ultimate Donator:
        options:
          default: false
          rank: '5'
        permissions:
        - essentials.firework
        - essentials.god
        - essentials.heal
        - essentials.nick.format
        - essentials.workbench
        - essentials.kit.UltimateDonator
        - essentials.warps.UltimateDonatorLounge
        - essentials.chat.magic
        - essentials.joinfullserver
        - modifyworld.*
        - trail.rains
      Grand Donator:
        options:
          default: false
          rank: '6'
        inheritance:
        - Donator
        permissions:
        - essentials.feed
        - essentials.kit.GrandDonator
        - essentials.skull
        - essentials.skull.others
        - essentials.nick.color
        - essentials.enderchest
        - enderchest.ext
        - essentials.warps.GrandDonatorLounge
        - essentials.chat.format
        - essentials.joinfullserver
        - modifyworld.*
        - trail.all
      Donator:
        options:
          default: false
          rank: '7'
        inheritance:
        - Rank III
        permissions:
        - modifyworld.*
        - essentials.kit.Donator
        - essentials.afk.kickexempt
        - essentials.nick
        - essentials.warps.DonatorLounge
        - essentials.chat.color
        - essentials.joinfullserver
        - trail.allow
        - trail.blocks
      Rank III:
        options:
          default: false
          rank: '8'
        inheritance:
        - Rank II
        permissions:
        - modifyworld.*
        - essentials.kit.RankIII
        - essentials.msg.url
      Rank II:
        options:
          default: false
          rank: '9'
        inheritance:
        - Rank I
        permissions:
        - modifyworld.*
        - essentials.kits.Woodcutter
        - essentials.kits.Miner
        - essentials.mail.sendall
        - essentials.me
        - essentials.msg.color
        - essentials.msg.format
        - essentials.msg.multiple
        - essentials.seen
        - essentials.seen.banreason
        - essentials.suicide
        - essentials.ping
        - essentials.warps.Shops
        - essentials.warps.Lounge
        - essentials.warp.list
      Rank I:
        options:
          default: true
          rank: '10'
        permissions:
        - modifyworld.*
        - essentials.build
        - essentials.kit
        - essentials.kits.Beginner
        - essentials.balance
        - essentials.balance.others
        - essentials.balancetop
        - essentials.pay
        - essentials.afk
        - essentials.afk.auto
        - essentials.ignore
        - essentials.list
        - essentials.mail
        - essentials.mail.send
        - essentials.motd
        - essentials.msg
        - essentials.recipe
        - essentials.rules
        - essentials.spawn
        - essentials.sethome
        - essentials.sethome.bed
        - essentials.help
        - essentials.home
        - essentials.home.bed
        - essentials.delhome
        - essentials.tpa
        - essentials.tpahere
        - essentials.tpaccept
        - essentials.tpdeny
        - essentials.warp
        - essentials.warps.Spawn
        - essentials.warps.Rules
        - essentials.helpop
        - jobs.command.browse
        - jobs.command.join
        - jobs.command.leave
        - jobs.command.stats
        - jobs.command.info
        - jobs.command.playerinfo
        - factions.kit.rank0
        - discordmc.chat
    schema-version: 1
    users:
      48f35264-04ac-4efa-9810-f2a00e8ad39a:
        group:
        - Rank II
        - Owner
        options:
          name: Vanthios
          group: Owner
    
    The solution was in the way PermissionsEx orders the addition of group adds to the permissions file. It stacks the latest added group, then EssentialsChatX pulls from the top of the list, thus applying the tag relative to the latest group add. To fix this, simply clear the list in the permissions.yml file, then set the following line in the PEX config file:

    Code:
     user-add-groups-last: true
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 15, 2017
Thread Status:
Not open for further replies.

Share This Page