Per- Item permission restriction #34

  • New
  • Enhancment
Assigned to _ForgeUser7599051
  • _ForgeUser7599051 created this issue Apr 28, 2012

    Is it possible to restrict certain items to certain groups (permissions?). If not this would be a great feature to add. (for example I could give the node or for players to buy ONLY stone, and no other item)

  • _ForgeUser7599051 added the tags New Enhancment Apr 28, 2012
  • _ForgeUser7599051 posted a comment Apr 28, 2012

    Would it work if there was an optional item configuration (say "group") where if 'group' existed in the config, then the player would have to be in a permission group of the same name?

    the config node could look something like this

      - member
      - admin

    this would restrict the item to members and admins.

  • _ForgeUser4861045 posted a comment Apr 28, 2012

    Yes this has the same effect in the end, just needs an extra reliance on your plugin. As long as there is some sort of /market reload command, it won't make a difference in the end, not sure if that exists yet or not.

    It's a bit easier for you though, in my opinion, if you just check for the parent node first, and if this is not found, then you can check for the specific node of the item they are looking to buy.

    For example, if they want to buy stone:

    Check for "". If they have it, good, let them buy it (its a parent node, stone is allowed). If they don't have it, lets check if they have (or If they have that, let them buy it. If not, they are out of luck and not allowed to buy stone.

    Edited Apr 28, 2012

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