Plugin Help PermissionsEx Help.. Please.. Can't do it.

Discussion in 'Plugin Help/Development/Requests' started by emilyrosebeech, Oct 1, 2015.

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

    emilyrosebeech

    groups:
    Maggot:
    options:
    rank: '100'
    default: true
    permissions:
    - essentials.signs.use.*
    - essentials.warp.*
    - essentials.warps.*
    - essentials.warp
    - essentials.sethome
    - essentials.sethome.multiple
    - essentials.back
    - essentials.worth
    - essentials.suicide
    - essentials.pay
    - essentials.kit
    - essentials.kits.maggot
    - essentials.kit.maggot
    - essentials.signs.use
    - essentials.signs.place
    - essentials.signs.use.buy
    - essentials.signs.use.sell
    - essentials.signs.use.warp
    - essentials.signs.create.sell
    - essentials.signs.create.buy
    - essentials.itemid
    - essentials.mail
    - essentials.mail.send
    - essentials.tpahere
    - essentials.sell
    - essentials.warp
    - essentials.delhome
    - essentials.home
    - essentials.sethome.multiple.default
    - essentials.warp.list
    - essentials.warp
    - essentials.spawn
    - essentials.realname
    - essentials.rules
    - essentials.msg
    - essentials.help.*
    - essentials.balance
    - essentials.bal
    - essentials.money
    - essentials.helpop
    - essentials.tpdeny
    - essentials.list
    - essentials.tpaccept
    - essentials.tpa
    - modifyworld.*
    prefix: '&e[Maggot] &f'
    Earthling:
    rank: '90'
    default: false
    permissions:
    - essentials.hat
    - essentials.me
    - essentials.baltop
    - essentials.balancetop
    - essentials.kits.earthling
    - essentials.kit.earthling
    - essentials.sethome.multiple.vip
    prefix: '&f[Earthling] &f'
    inheritance:
    - Maggot
    Astronaut:
    rank: '80'
    default: false
    permissions:
    - essentials.kits.astronaut
    - essentials.kit.astronaut
    - essentials.feed
    - essentials.afk
    prefix: '&3[Astronaut] &f'
    inheritance:
    - Maggot
    - Earthling
    Commander:
    rank: '70'
    default: false
    permissions:
    - essentials.nick
    - essentials.kits.commander
    - essentials.kit.commander
    - essentials.sethome.multiple.staff
    - essentials.balance.others
    - essentials.msg.color
    prefix: '&e[&6Commander&e] &f'
    inheritance:
    - Maggot
    - Earthling
    - Astronaut
    Alien:
    rank: '60'
    default: false
    permissions:
    - essentials.kits.alien
    - essentials.kit.alien
    - essentials.heal
    - essentials.top
    - essentials.workbench
    - essentials.back.ondeath
    - essentials.nick.color
    prefix: '&2[&aAlien&2] &f'
    inheritance:
    - Maggot
    - Earthling
    - Astronaut
    - Commander
    Elite:
    rank: '50'
    default: false
    permissions:
    - essentials.kits.elite
    - essentials.kit.elite
    - essentials.echest
    - essentials.enderchest
    - essentials.sethome.multiple.20
    - essentials.fix
    - essentials.tp
    - essentials.invsee
    - essentials.ptime
    - essentials.mute
    - essentials.fly
    prefix: '&0&L[&5&LElite&0&L] &f'
    inheritance:
    - Alien
    - Maggot
    - Commander
    - Astronaut
    - Earthling
    Immortal:
    rank: '40'
    default: false
    permissions:
    - essentials.kits.immortal
    - essentials.kit.immortal
    - essentials.kits.op
    - essentials.kit.op
    - essentials.kits.potion
    - essentials.kit.potion
    - essentials.fixall
    - essentials.sethome.multiple.unlimited
    - essentials.vanish
    - essentials.tphere
    prefix: '&0&L[&4&LIMMORTAL&0&L] &f'
    inheritance:
    - Elite
    - Alien
    - Maggot
    - Commander
    - Astronaut
    - Earthling
    Moderator:
    rank: '30'
    prefix: '&a&L[Mod] &f'
    permissions:
    - essentials.mute
    - essentials.ban
    - essentials.kick
    - essentials.kick.notify
    - essentials.ban.notify
    - essentials.tempban
    - essentials.tp.others
    - essentials.time
    - essentials.spawner
    - essentials.kit.*
    - essentials.time.sethome
    - essentials.tphere
    - essentials.broadcast
    inheritance:
    - Elite
    - Alien
    - Maggot
    - Commander
    - Astronaut
    - Earthling
    - Immortal
    Co-Owner:
    rank: '20'
    prefix: '&c&o[Co-Owner] &f'
    permissions:
    - '*'
    - essentials.*
    Owner:
    rank: '10'
    prefix:'&0&L[&c&LOwner&O&L] &f'
    permissions:
    - '*'



    It just does'nt work.. and its annoying me.. help is very much so appreciated.
     
  2. Offline

    oceantheskatr

    Could you please post your permissions file on http://pastebin.com/ and link the URL here? Doing so will allow us to maintain the formatting, which is absolutely key to YAML files. If you're even a space or colon off, the whole file won't work.
     
  3. Offline

    emilyrosebeech

  4. Offline

    oceantheskatr

    @Boomer Could you give your explanation about formatting?
     
  5. Offline

    Boomer

    Other than "Its gotta be perfect or it wont cooperate?"
    All data in YAML must be presented in a relationship based manner, and relationships are denoted by indentation levels. The main root "groups:" defines a block of groups, each block in groups is defined by groupname: block definitions, so everything that comes after that belongs to groupname: and must be indented another level. Then within a group block you have other blocks like "options" , key: value data like default: true and prefix: '[Mod]' , and Listblocks such as permissions and inheritance lists. Indentation level defines how the data should be parsed into a usable level.

    Colins always need to be followed by nothing if used as a block definition, by a space if used as a key: value pair, should be followed by a space and [] if defining an empty list, ie inheritance: [], and if used as the DATAVALUES for a key: value entry, must have NO spaces after it (applicable to almost all Kit definitions)
    You have i think THREE instances where a prefix string is given with no space after the colin, which will cause the parser to just stop outright and not even be able to use the mental image of the datastructure up to that point.

    For everything else, indentation relative to its surroundings and 'superior' is what defines its position. Lists such as permissions and inheritances are one of the only flexible cases in YAML, in that the hyphens can be either aligned with the block definition, or indented one more level. A Level is a fixed amount of spaces typically 2, and each successive level of indentation is an integer multiple of that - so indentations at 0,2,4,6,8 or 0, 3, 6, 9, 12 or 0, 4, 8 , 12 , 16 are all fine, 2 is most common for being condensed, yet able to distinguish the indentations clearly. You are using 2 spaces per level in your file as your base, so we will go from that:

    However, your structure is unparseable due to many things being indented incorrectly -- you have all your prefix: string key: data pairs are indented a level further than the permission nodes listed, making them a key: value pair of data within a permission: block, but you have already used the block for list data so the parser gets confused, throws its arms in the air and goes home, refusing to work any further.

    You need to bring the prefix: string key: value pairs out of the permission: blocks

    In some group blocks you have the options: block, with the prefix and rank key-values in the options block, then in other group blocks, you do not have the options: block at all. @oceantheskatr can prob fill in if that is a requirement or not for PEX, as they may be required put in the options: block, or they might also function as stand-alone key-values , but i do not know if you can mix-and-match them within a pex file. I do know that for all the groups where you have unblocked rank and default: false entries, they are indented TOO FAR. Indenting too far means that they are information that is relative to.. nothing, since nothing is just one indentation level above them when you dive in two levels deep. You can either slap the option: block definition in place and keep rank/default shifted over, or shift rank/default to the left. Either will generate a technically correct YAML parseable file, which all files must be at minimum for them to be usable, but not all technically correct files can work if the plugin is expecting pieces of information to be presented a particular way and it finds the data soemwhere unexpected, or missing where it expects it.

    Paste your entire yaml file into a yaml-parser checker such as:
    http://yaml-online-parser.appspot.com/ and then go through making the changes to the datastructure - as you will see, you will see errors on the right hand window (which match the errors you get spewed out by the server log when it tried to load the file), and as you change things, the error message will change to other errors, and change again and again, until all the errors in the structure is gone, and it replaces it with a JSON format output. I didn't keep track of all the changes required to make it a technically viable file, but i did describe them as i found them here - first was missing spaces in the prefix: strings for at least 3 entries, then pulling the prefix out everywhere, and pulling rank/default out to earlier indentations as well. So try going at it until you elminate all the format errors, then hopefully a frresh server start with that file will work - but as long as you have errors in that editor window, there is NO way that Pex will ever be able to work, as PERFECTION is a requirement for the parser to hand over data to the plugin.

    [​IMG]

    NOTE: I like your ranknames. Its about 1 time per year we see originalish rank names and rank themes. Ten points for that.
     
  6. Offline

    emilyrosebeech

    Thanks for all the detail! So confusing still.. Ill give everything you said a go, I'm just not a plugin person.. I have tried all the stuff in the parser previously and just couldn't get it right.

    I cant seem to do it... If someone could do it for me that would be amazing.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 30, 2015
  7. Offline

    oceantheskatr

    spoonfeeding.jpg
    This doesn't usually happen.
     
  8. Offline

    Boomer

    Start clean again then if you're messing things up and getting lost {Keep a copy somewhere since you know what ranks you want, what permissions you want for them} by wiping the file, and starting again by using commands to create all the groups, ranknumber, prefixes, and add one permission node to each group -- then you can stop the server, edit the file, and use that structure layout to transfer the permission nodes from your existing file into the new one, having a rock-solid file structure format to follow.

    Or you could pastebin the file with the changes that you have made, to see how much you were able to get right, how far you got... you may be at the one-single-tiny-one missing stage right now. But if its just the same file with 50 new problems in it going way way off base from the approaches outlined... thats going to show you really missed the mark, and will definitely be deleting the file for compassionate reasons.
     
    oceantheskatr likes this.
  9. Offline

    emilyrosebeech

    Right then..
     
  10. Offline

    oceantheskatr

  11. Offline

    emilyrosebeech

    Cheers
     
    Last edited: Oct 3, 2015
Thread Status:
Not open for further replies.

Share This Page