Zrips / Jobs

Jobs
Apache License 2.0
172 stars 213 forks source link

[Enhancement] limitedItems Blacklist #1617

Open PaxJaromeMalues opened 1 year ago

PaxJaromeMalues commented 1 year ago

Description of new idea or improvement on existing one

This is not thought to replace limitedItems! Its thought as a parallel feature using the same mechanics but in a different way. As This is using already in place functionality, maybe the whole feature also takes less time to implement, if considered.

Using the same mechanics to prohibiting the use of an item by limitedItems, implement a blacklist (probably at the end of a config) for items by their ingame designation.

Detailed information

If an item is named in the blacklist for example DIAMOND_PICKAXE:

Config Example

  ... jobs/job.yml

  cmd-on-leave:
  - msg [name] You have left this awesome [jobname] job
  - msg [name] See you soon!
  limitedItems:
    firstOne:
      id: 278
      level: 5
      name: '&8Miner Pickaxe'
      lore:
      - '&eBobs pick'
      - '&710% bonus XP'
      enchants:
      - DAMAGE_ALL=1
      - FIRE_ASPECT=1
  item-blacklist:
    DIAMOND_PICKAXE:
      prohibit_usage: true/false
      prohibit_crafting: true/false
    DIAMOND_AXE:
      prohibit_usage: true/false
      prohibit_crafting: true/false
    DIAMOND_SHOVEL:
      prohibit_usage: true/false
      prohibit_crafting: true/false
PaxJaromeMalues commented 1 year ago

Oh, one more, the recognition of custom items like from CustomItems, Custom Recipes or ItemsAdder by their ingame name would be sick. This would for example make it possible to restrict anyone but the baker from cafting Bread items or flour (if added).