You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some servers might have unique items, they do not want to be sold. May it be due to a story quest or just because a dupe gave some person 9 million barrier blocks. In these cases or others, you might want to stop the trade of certain items with a blacklist.
Implementation
Create a new config file to handle the blacklist (itemblacklist.yml). Some servers might add a ton of items to this list. In that case, storing the blacklist in the standard config, would make it quite unreadable.
The way items are defined will vary a lot, so there should be a bunch of options:
blacklist:
# -------- Compact design: ---------# The material can be defined via material:name. This should use the same names as F3+H ingame, not the bukkit STONE names.
- material:stone # Using two ;; separates options. itemname and lore can be used to filter for these settings. \n equals a new line of lore. # If a lore or name line starts with &- it means that the check should ignore colors. ChatColor.stripcolors()
- material:diamond_pickaxe;;itemname:King's Axe!;;itemlore:Only wielded by\n&-the king during combat!# Enchantments can be defined with or without a associated level. /{level} and are separated by comma. # A > or < sign can be use limit to values greater then or less then.
- enchantments:depth_strider,feather_falling/4,unbreaking/>1,mending# potions work the same way as Enchantments. Durability can be a value or if it ends with % a percent value. # Can be used with > or < too.
- potions:slow_falling,resistance/<4;;durability:100%# Attributes consist of the syntax: name of the attribute/ value of the attribute/ operation of the attribute/ affected slots.# Slots are separated by the & symbol.# Hide flags targets the various flags to hide. Unbreakable is a boolean value, either true or false.
- attributes:max_health/1/amount/mainhand&offhand;;hide_flags:modifiers,unbreakable;;unbrekable:true# -------- Readable/Comfy design: ---------# Items have a identifier name to find them easier.
- item1:
material: fishing_rodenchantments:
- lure: >1# Level 0 equals not here at all. Level -1 equals enchantment is present with any level.
- unbreaking: 0unbreakable: true
Implement a ingame blacklist editor. /ecsadmin blacklist will show a gui list of all the blacklist filters. If a filter doesn't have a material, display a replacement item here instead (paper or structure void)
Filters don't neccessarily need a item. When inside the blacklist gui, have a button to select a item from your inventory. Whichever item you click next in your bottom inventory will be added as a blacklisted item. You will be directed to a new window with various buttons. You can select all the item settings you want to use for the blacklist:
A shop selling a blacklisted item should still be opened when clicked, however, the buy and sell options should be disabled. Creating a shop with a blacklisted item should throw an error.
The text was updated successfully, but these errors were encountered:
Short Description
Implementation
itemblacklist.yml
). Some servers might add a ton of items to this list. In that case, storing the blacklist in the standard config, would make it quite unreadable./ecsadmin blacklist
will show a gui list of all the blacklist filters. If a filter doesn't have a material, display a replacement item here instead (paper or structure void)The text was updated successfully, but these errors were encountered: