Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
plugin:showitem:config [2020/12/13 23:29] – created phoenix616plugin:showitem:config [2020/12/14 00:19] – [Item Blocker] phoenix616
Line 6: Line 6:
  
 The other yml files ([transmapping.yml](http://l.phoenix616.dev/transmapping#file-transmapping-yml), [iconrpmapping.yml](https://gist.github.com/Phoenix616/d40932c617c8b6aefbb913eddd46f73b) and [iconrpmapping-flattening.yml](https://gist.github.com/Phoenix616/d0ebb61682562f54690fdc7ea79e4d2a)) are used for mapping the bukkit materials to translation keys for multi language support and for the chat icons. The other yml files ([transmapping.yml](http://l.phoenix616.dev/transmapping#file-transmapping-yml), [iconrpmapping.yml](https://gist.github.com/Phoenix616/d40932c617c8b6aefbb913eddd46f73b) and [iconrpmapping-flattening.yml](https://gist.github.com/Phoenix616/d0ebb61682562f54690fdc7ea79e4d2a)) are used for mapping the bukkit materials to translation keys for multi language support and for the chat icons.
 +
 +## Item Blocker
 +
 +You can define which items players are able to show and which not. These settings can be defined in the "block" section of the config.yml:
 +
 +<code yaml>
 +# Block certain items from getting shown.
 +# Can be bypassed with showitem.blockbypass and showitem.blockbypass.<blockname>
 +block:
 +  # Whether or not this match is inverted (match only items that don't match the values)
 +  inverted: false
 +  
 +  # List of materials to block
 +  # Materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
 +  material: []
 +  # - STONE
 +  # - DIAMOND_SWORD
 +
 +  # Block items with certain strings in their names from getting shown (case-insensitive)
 +  # r= prefix indicates that the string should be handled as a regex
 +  name: []
 +  # - "name 1"
 +  # - "r=name \\d"
 +
 +  # Block items with certain strings in the lore from getting shown (case-insensitive)
 +  # r= prefix indicates that the string should be handled as a regex
 +  lore: []
 +  # - "name 1"
 +  # - "r=name \\d"
 +
 +  # Item durability value, can use comparators, <x, >x, =x, !=x or just equal a single number
 +  # An empty string matches all durabilities
 +  # Also supports chaining of comparators with a comma. E.g. >5,<20 for between 5 and 20
 +  durability: ""
 +
 +  # Block items with the unbreakable tag
 +  unbreakable: false
 +
 +  # Block items with certain enchantments, can block both all or only certain levels
 +  # Names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
 +  # Can take the same comparators as the durability for the level
 +  enchantments: []
 +  # - "DAMAGE_ALL"
 +  # - "ARROW_DAMAGE:>2"
 +
 +  # Serialize the item to YAML and filter it with regex.
 +  # This is only for advanced users and is less efficient, leave empty to disable.
 +  serialized: ""
 +
 +  specific:
 +    # Block only specific items that match certain block types. All global types can be used.
 +    # Can by bypassed with showitem.blockbypass.specific.<name> e.g. showitem.blockbypass.specific.special-sword
 +    special-sword:
 +      material:
 +      - DIAMOND_SWORD
 +      name:
 +      - "Phoenix616's Sword"
 +      unbreakable: true
 +      enchantments:
 +      - "DAMAGE_ALL:>9000"
 +    # Add multiple matcher, e.g. an inverted matcher that
 +    # blocks everything that isn't in this matcher
 +    # inverted-match:
 +    #   inverted: true
 +    #   material:
 +    #   - WRITTEN_BOOK
 +
 +</code>
 +
 +By default only an example category is defined to block something (which shouldn't ever be an issue) and the comments explain each option. If you want certain players to bypass these blocks then you can use the `showitem.blockbypass` permission to allow bypassing of all blocks or the showitem.blockbypass.specific.<name> permission to allow bypassing certain specific blocks for a more finer control over what is blocked. (All specific blocks fall back on the default block if they didn't match, to bypass the default block use `showitem.blockbypass.specific.default`)