Items
Structure
item:
model-data: 499
flags:
- "HIDE_ATTRIBUTES"
- "HIDE_ENCHANTS"
enchants:
- "infinity"
material: "DIAMOND"
name: "<gold>Name"
lore:
- "<blue>Lore"
hide-tooltip: false
placeholders:
single: "<gold>Name"
multiple: "<gold>Names"
attributes:
event:
bypass:
- "BLOCK_BREAK"
cancel:
- "BLOCK_PLACE"
stackable: true
durability: 1
on-break-replacement: "Items/Currency/scrap.yml"
allow-enchant: false
allow-anvil: false
actions:
LEFT_CLICK:
- "[MESSAGE] <green>You left clicked!"model-data- Custom model data applied to the itemflags- Attribute flags the item will haveenchants- What enchants will the item havematerial- Materialname- The name of the itemlore- The lore of the itemhide-tooltip- Hide the "hover" tooltip of the itemplaceholders- Placeholders to use when the item is mentioned somewhere elseattributes.event.bypass- Bypasses protected areas mentioned permissions - applies to member permissionsattributes.event.cancel- Cancels the mentioned event - does not prevent actions from executingattributes.stackable- Allow the item to be stacked or not if applicableattributes.durability- The item's durabilityattributes.on-break-replacement- The replacement of the item when durability hits 0, leave empty for noneattributes.allow-enchant- Allow the item to be used inside an enchanting tableattributes.allow-anvil- Allow the item to be used inside an anvilactions- Item actions
Item types
Item type - "consumable"
To make an item have consumable properties it will need the consumable attribute:
item:
<...>
attributes:
<...>
consumable:
heal: 10
fuel: 1
actions:
RIGHT_CLICK:
1:
conditions:
- if: "%clicked-protection% && %consumable-has-effect%"
then:
- "[SOUND] ui.button.click 1 1"
durability-cost: 1
cancel-event: false
- else-if: "!%clicked-protection%"
then:
- "[MESSAGE] <red>Right click a protection block to use this!"consumable.heal- How much to heal per use - Applies only on protectionsconsumable-fuel- How much to fuel per use - Applies only on protections
Make sure to give it conditions to avoid wasting the item.
Item type - "currency"
To make an item have currency properties it will need the currency attribute:
item:
<...>
attributes:
<...>
currency: truecurrency- Setting this to true will allow the item to be used as currency
Item type - "protection"
To make an item have protection block properties it will need the protection attribute:
item:
<...>
attributes:
<...>
protection:
default-status: "Status/default-active.yml" # Starting status the protection should have
upgrades: # Available upgrades
- "Upgrades/range-1.yml"
#- "Upgrades/range-2.yml"
world-whitelist: [] # Override "global-whitelist" from "config.yml"
#- "world"
#- "!world_the_end"
block-material: "IRON_BLOCK" # Material the protection should be when it's placed
particle:
display:
range: 5.5 # Blocks | Display the particles when within X blocks
interval: 2 # Ticks | Spawn the particles every X ticks
member: "Particles/member.yml"
outsider: "Particles/outsider.yml"
ranks:
default:
owner: "Ranks/default-owner.yml"
member: "Ranks/default-member.yml"
outsider: "Ranks/default-outsider.yml"
protection: "Ranks/default-protection.yml"
available:
- "Ranks/default-enforcer.yml"
systems:
health:
amount: 25
capacity: 50
regen:
amount: 1
interval: 60 # Ticks
damage-delay: 100 # Ticks
range:
amount: 5
infinite-y: false
generator:
money:
amount: 25
interval: 2400 # Ticks
capacity: 500
items:
interval: 2400 # Ticks
capacity: 10
generate:
1:
currency: "Items/Currency/scrap.yml"
chance: 20.0
amounts: # Amount : Weight
1: 90
2: 9
4: 1
2:
currency: "Items/Consumables/copper-gear.yml"
chance: 10.0
amounts: # Amount : Weight
1: 90
2: 9
3: 1
storage:
slot-capacity: 10
fuel:
amount: 15
capacity: 25
consume-interval: 72000 # Ticks
price:
money:
amount: 100.0
modify: 0.0
multiply: 1.0
item:
currencies:
1:
currency: "Items/Currency/scrap.yml"
required: true
amount: 1
modify: 0.0
multiply: 1.0
decay:
interval: 216000 # Ticks
price:
money:
amount: 2500.0
item:
currencies:
1:
currency: "Items/Currency/scrap.yml"
required: true
amount: 20
on-redeem:
fuel:
modify: 5
multiply: 1
health:
modify: 5
multiply: 1
generator:
money:
modify: 0
multiply: 0.75
items: # Randomly selected
amount: 0.2 # Percent amount of items to remove
storage:
remove-items: # Randomly selected
amount: 0.2 # Percent amount of items to remove
decay-timer:
reset: true
trap:
radius: 80 # Percent radius of the protection's range
player-cooldown: 100 # Ticks
events:
on-entry:
executables:
- "[EFFECT] SLOWNESS 100 1" # <EFFECT> <TIMER> <AMPLIFIER>
announce:
outsider: true
members: true
damage: # Default damage amount per source - Gets added on top of the item's damage if applicable
blast: 25
tool: 5
none: 1
defense: # Formula: incoming_damage * (scaling_factor / (scaling_factor + defense))
amount: 0
capacity: -1
scaling-factor: 100
augments:
crops:
growth-speed:
multiplier: 1.5
yield-bonus:
chance: 25.0
multiplier: 1.5
multi-harvest:
chance: 10.5
multiplier: 2.0
fertilizer-efficiency:
chance: 75.0
multiplier: 1.5
exp:
chance: 5.0
amount: 1
mobs:
looting:
multiplier: 2.0
exp:
multiplier: 1.25
spawner:
limit:
bonus: 3
interval-reduction:
amount: 20 # TicksItem type - "tool"
Tools are mostly regular items, but with actions, conditions and damage.
item:
<...>
attributes:
<...>
protection:
damage: 10 # How much damage the item does against protection blocks
bypass-regen: true # Allow the item to bypass the regen system in some scenarios
actions:
BLOCK_BREAK:
1:
conditions:
- if: "%clicked-other-protection%"
then:
- "[SOUND] block.beacon.deactivate 1.0 1.0"
durability-cost: 1
cancel-event: falseLast updated