Revoke permission not working #22


  • New
  • Defect
Open
Assigned to zrips
  • _ForgeUser9048305 created this issue Dec 26, 2015

    What steps will reproduce the problem?
    1. Give a job a certain permission at level 1
    2. Revoke that permission on level 10 (false)

    What is the expected output? What do you see instead?
    I want the player to have a certain permission on level 1, and then remove it on level 10 (to give them something other instead).
    But instead the player won't even have that permission on level 1. So there's a problem how permissions are read/refreshed.

    What version of the product are you using?
    Jobs 2.55.0

    Do you have an error log of what happened?
    mypermission.1:
            value: true
            level: 0
    mypermission.1:
            value: false
            level: 10
    mypermission.2:
            value: true
            level: 10

    => The player won't have the permission at all.

    Please provide any additional information below.
    Is it possible to negate the permission itself ???
    It will look like this :
    mypermission.1:
            value: true
            level: 0
    -mypermission.1:
            value: true
            level: 10
    mypermission.2:
            value: true
            level: 10

    Since I use bpermissions, I don't know if I should use the ^ sign, as this is used to negate permissions.

  • _ForgeUser9048305 added the tags New Defect Dec 26, 2015
  • _ForgeUser9048305 posted a comment Dec 26, 2015

    Edit: I tried to negate the permission with - and ^ , it doesn't work. And another little question, is there a way to execute a command (console) when a player reaches a certain level ? (However this feature won't fix my problem.)

  • Zrips posted a comment Jan 10, 2016

    you can use commands variable instead of permissions as with thos can be some issues with different permission plugins.

        # Commands executed when player reached level
        commands:
          # command name, just to have better idea what this do
          fly:
            # Command its self, this will be executed from console, so all commands should work
            # Possible variables are: [player] [jobname] [oldlevel] [newlevel]
            command: manuaddp [player] essentials.fly
            # When to execute this command first time
            levelFrom: 100
            # Until when to do this command
            # This can be set to same level as levelFrom, so this command will be executed only once
            levelUntil: 100
          kit:
            command: manuaddp [player] essentials.kits.woodcutter
            levelFrom: 150
            levelUntil: 150
    

    with this you can perform some commands when reaching particular level of that job. You can use this one to, to set default permissions when joining jobs

        cmd-on-join:
        - 'msg [name] Thx for joining this job!'
        - 'msg [name] Now start working and get money from [jobname] job!'
    

    check this link https://github.com/Zrips/Jobs/blob/master/jobConfig.yml there is up to date possible ways to play around with jobConfig file to get best possible result you want


To post a comment, please login or register a new account.