Learn how to customize the way effects are displayed in item lore, including visibility controls, formatting, and display limits.
Overview
zItems provides fine-grained control over how effects appear in item lore. You can:
Control visibility of base effects vs additional effects
Limit the number of effects shown
Customize formatting using messages
Show "And More..." when effects are truncated
Separate base lore from effect lore
Display Settings
Per-Item Settings
Configure in your item YAML files (items/*.yml):
id:"my_pickaxe"# ... other settings ...# Effect Display Controlnb-effects-view:-1# How many effects to showbase-effects-visible:true# Show base effectsadditional-effects-visible:true# Show added effects
nb-effects-view
Controls how many effects are displayed in lore:
Value
Behavior
-1
Show all effects (no limit)
0
Show no effects (hide all)
> 0
Show up to N effects, then "And More..."
Examples:
base-effects-visible
Controls whether effects defined in the item config are shown:
Base effects are those defined in the effects: list in the item YAML.
additional-effects-visible
Controls whether effects added via commands are shown:
Additional effects are those applied using /zitems effect apply.
Global Default Settings
Configure in config.yml:
This applies to all items that don't specify nb-effects-view in their YAML.
Lore Formatting
Effect lore is formatted using the messages system. Customize in messages.yml:
Message Placeholders
effects-lore-line
The <effect> placeholder is replaced with the effect's display-name from the effect YAML:
Effect YAML:
Result in lore:
How Lore Generation Works
During Item Build
When an item is first created (/zitems item give):
Base lore is added from lore: in item YAML
Effect lore is generated based on base-effects-visible and nb-effects-view
Both are combined and applied to the item
Effects are stored in PDC (PersistentDataContainer)
Implementation: ZItem.java:build()
When Effects are Applied
When effects are added via /zitems effect apply:
Effect is added to PDC
Lore is recalculated:
Base effects = original effects from config
Additional effects = effects in PDC not in base
Effect lore is regenerated based on visibility settings
# Show all effects
nb-effects-view: -1
# Hide all effects
nb-effects-view: 0
# Show first 3 effects only
nb-effects-view: 3
# Show base effects
base-effects-visible: true
# Hide base effects (only show added effects)
base-effects-visible: false
# Show additional effects
additional-effects-visible: true
# Hide additional effects (only show base)
additional-effects-visible: false
# Default value for nb-effects-view if not specified per-item
default-nb-effects-view: -1
# Empty line before effects section
effects-lore-header: ""
# Title of effects section
effects-lore-title: "<gray>Effects"
# Each effect line (placeholder: <effect>)
effects-lore-line: "<dark_gray>- <effect>"
# When effects are truncated (nb-effects-view > 0)
effects-lore-more: "<dark_gray>- <white>And More..."