Shopkeepers

Shopkeepers

2M Downloads

Remove others command permission is ignored

RodargDev opened this issue ยท 1 comments

commented

Im trying to give the admins on my server permission to remove shopkeepers from other people. Ive given them the permission shopkeeper.remove.others which I would expect would give them access to removing others shopkeepers. But whenever they now use this command they get the error: "You are not the owner of this shopkeeper".

After looking through the code very quick i think its related to this check shopkeeper.canEdit() but im not 100% sure but since the permission check below it looks fine it might be related to the canEdit check. It appears this prevents the user with the correct permission to remove the shopkeeper even though the permission is specifically made for removing the shopkeeper of other users, at least that's what I make of it by reading the docs. Is this a bug or is this by design?

commented

Since some recent update, the player executing the command also requires the shopkeeper.bypass permission.

  • shopkeeper.bypass: Allows the player access to the shops of other players (which also allows deleting shops via the editor).
  • shopkeeper.remove.others: Allows using the delete command and target the shops of other players.

It doesn't make much sense to disallow access to other player's shops but allow them to delete them via command. For consistency, the player using the command therefore requires both permissions now: The bypass permission to access the shop, and the "remove.others" for the access to this command variant.