falkirks / RankUp

A comically full-featured prison rankup plugin for PocketMine-MP
MIT License
19 stars 49 forks source link

Perm #23

Closed LewBr closed 6 years ago

LewBr commented 8 years ago

Permissions does't work

i will add

1: entrance: [] exit: [] perms: - pocketmine.command.say members: []

but doesnt works! fix this pls

Ifera commented 6 years ago

@Falkirks after testing I can confirm this issue still exists.

falkirks commented 6 years ago

The permission doesn't get added?

falkirks commented 6 years ago

From what I can tell the way Group in rankupdoesgroups handles permission attachments is entirely wrong.

Ifera commented 6 years ago

@Falkirks yes it doesn't. I used this.

---
groups:
  A:
    entrance:
    - say {name} ranked up to A
    exit: []
    perms:
    - pocketmine.command.say
    - -pocketmine.command.me
    members: []
  B:
    entrance:
    - say {name} ranked up to B
    exit: []
    perms:
    - pocketmine.command.say
    members:
    - JackMPlayz
  C:
    entrance:
    - say {name} ranked up to C
    exit: []
    perms: []
    members: []
  D:
    entrance:
    - say {name} ranked up to D
    exit: []
    perms: []
    members: []
...

And when i ranked up to A=>B i was unable to use the /say command.

falkirks commented 6 years ago

I have an idea how to fix it, but I can't test it right now, hopefully I have a chance later today.

Ifera commented 6 years ago

Maybe add a commit I can test it for you.

falkirks commented 6 years ago

It is probably going to be a bit tricky, I will see

Ifera commented 6 years ago

Okay

falkirks commented 6 years ago

Yeah, something weird is going on that I can't quickly see. I will look again later.

Ifera commented 6 years ago

Okay take your time.

Adam1609 commented 6 years ago

open this issue, sometimes the permission doesn't work @Falkirks can you confirm this?

Ifera commented 6 years ago

I thought that Falkirks fixed this. What permissions doesn't work? Maybe you set the config a bit wrong?

Adam1609 commented 6 years ago

Nope, I didn't set anything wrong, it only work when I reload my server When ranking up, sometimes Member can't use command like /warp (which I have setting up)

Ifera commented 6 years ago

If its not working do it this way. This is how I do used to do and it worked.

---
groups:
  A:
    entrance:
    - say {name} ranked up to A
    - setuperm {name} essentials.warps.A
    exit: []
    perms: []
    members: []
  B:
    entrance:
    - say {name} ranked up to B
   - setuperm {name} essentials.warps.B
   - unsetuperm {name} essentials.warps.A
    exit: []
    perms: []
    members: []
...

This is an alternative way but you need to have PurePerms for perms and etc.

Adam1609 commented 6 years ago

that's a good idea, somehow XD one :+1:

Ifera commented 6 years ago

Ikr. Thats what I had been doing and it sort of did the trick

Adam1609 commented 6 years ago

I think I found the problem @JackMD @Falkirks The number of people will show up like members: 0: asdasdas (for example) the permission will work But some how the more you rank up, the numbers will change to "-", which is the problem that members can't execute command even if the permission is on

falkirks commented 6 years ago

That's just YAML guessing the data is not associative, it shouldn't change anything that comes to the program. Do permissions also perhaps break when the server restarts?

Adam1609 commented 6 years ago

I don't know, I am not even reload or something