Configuration

Configuration Guide

This guide covers all configuration files and settings in zItems.

Configuration Files Overview

zItems uses multiple configuration files:

plugins/zItems/
├── config.yml          # Main plugin configuration
├── messages.yml        # Customizable messages
├── items/*.yml         # Custom item definitions
└── effects/*.yml       # Effect definitions

Main Configuration (config.yml)

The main configuration file contains plugin-wide settings.

Default Configuration

# Debug mode - enables detailed logging
debug: false

# Default number of effects to display in item lore
# -1 = show all effects
# 0 = hide all effects
# >0 = show only this number of effects (remaining shown as "...")
default-nb-effects-view: -1

# Block break event plugins (optional)
# List of plugins that should receive BlockBreakEvent when using Hammer/Vein Mining
# block-break-event-plugins:
#   - "ExamplePlugin"

Settings Reference

debug

Type: boolean Default: false Description: Enables debug logging in console

When enabled, you'll see detailed information about:

  • Effect loading and registration

  • Item building process

  • Effect application

  • Block breaking events

  • Drop calculations

Example:

Console Output:


default-nb-effects-view

Type: integer Default: -1 Description: Global default for effect lore display

Values:

  • -1 - Show all effects on all items

  • 0 - Hide all effects on all items

  • >0 - Show only this number of effects

This can be overridden per-item with the nb-effects-view setting.

Examples:

Item Override:


block-break-event-plugins

Type: List<String> Default: null (empty) Description: Plugins that should receive BlockBreakEvent when using area mining effects

Why This Exists: When using Hammer or Vein Mining, zItems fires custom BlockBreakEvents for each block. By default, these events are limited to specific plugins (WorldGuard, SuperiorSkyBlock2, etc.) to prevent issues with other plugins double-processing blocks.

If you want a custom plugin to receive these events, add it to this list.

Example:

Technical Details:

  • Events are fired using EventUtil.fireEvent()

  • Only plugins in this list (plus hardcoded protection plugins) receive the events

  • This prevents duplication bugs with poorly-coded plugins


Messages Configuration (messages.yml)

All user-facing messages can be customized using MiniMessage format.

Message Categories

Placeholders

Messages support various placeholders:

Placeholder
Description
Used In

<effect>

Effect display name or ID

Effect commands

<item>

Item display name

Item commands

<player>

Player name

Give commands

<amount>

Item/effect amount

Give commands

<count>

Number of effects

View command

<id>

Effect ID

View command

<type>

Effect handler type

View command

<priority>

Effect priority

View command

<display-name>

Effect display name

View command

MiniMessage Formatting

All messages support MiniMessage format:

Colors:

Formatting:

Hover & Click:

Customization Example


Item Configuration

Items are defined in plugins/zItems/items/*.yml files.

Complete Item Structure

Required Fields

Only two fields are required:

Everything else is optional!

Field Reference

For detailed information about each field, see:

  • Creating Items Guide

  • Item Settings API


Effect Configuration

Effects are defined in plugins/zItems/effects/*.yml files.

Basic Effect Structure

Effect Types

See Effect Handlers Reference for all available types and their specific settings.

Effect Representation

Effect representations allow effects to be applied via smithing tables or GUIs:

Applicator Types:

  • SMITHING_TABLE - Apply via smithing table

  • GUI - Apply via custom GUI (future feature)


Configuration Best Practices

1. Use Descriptive IDs

2. Organize Files

Create subdirectories for organization:

3. Comment Your Configs

4. Use YAML Anchors for Reusability

5. Test Incrementally

  1. Create configuration file

  2. Reload: /zitems reload

  3. Check console for errors

  4. Test in-game

  5. Iterate

Don't create complex configs all at once!


Validation & Error Checking

Common Errors

YAML Syntax Error:

Solution: Check YAML syntax - likely missing space after colon

Unknown Material:

Solution: Check spelling against Bukkit Material list

Missing Required Field:

Solution: Add the required field

Validation Tools

Use online YAML validators:

  • https://www.yamllint.com/

  • https://jsonformatter.org/yaml-validator


Performance Considerations

Effect Caching

Effects are cached after first load. Changes require /zitems reload.

Custom Model Data

Use custom-model-data sparingly:

Lore Length

Keep lore concise:


Migration from zItemsOld

If you're migrating from the old zItems plugin, see the Migration Guide.


Next Steps

  • Creating Items - Detailed item creation guide

  • Effects System - Understanding effects

  • Effect Handlers - All available effects


Need help? Check our GitHub Issues or join our Discord!

Last updated