drtshock / PlayerVaults

Player vaults for player players.
GNU General Public License v3.0
89 stars 123 forks source link

Add blocking items by display name #442

Open addstar opened 2 years ago

addstar commented 2 years ago

This adds functionality to allow blocking items by display name. It checks against the exact display name and doesn't take colours into consideration, so names need to include colours. Not sure if you would prefer it to work a little different, it's a fairly simple change. I tried to make minimal changes, hopefully this is ok.

An example of a working config:

itemBlocking {
    enabled=true

    # Material list for blocked items (does not support ID's), only effective if the feature is enabled.
    # If you don't know material names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
    list=[]

    # Exact item names for blocked items, only effective if the feature is enabled.
    # Useful for blocking custom items based on item name.
    names=[
        "§eSmall Backpack",
        "§eMedium Backpack",
        "§eLarge Backpack"
    ]

    ....

image