Custom Items

The Custom Items System in CrisStealCore allows you to define fully customizable items via simple .yml files located in:

/plugins/CrisStealCore/
 β”œβ”€β”€ items/
 β”‚   β”œβ”€β”€ heart-1.yml
 β”‚   β”œβ”€β”€ item_example.yml
 β”‚   └── ... create more if you want

Each .yml file represents one unique item β€” including its appearance, behavior, effects, cooldowns, sounds, particles, commands, messages, and even requirements or conditions to activate.

There’s no hardcoding required β€” just drop a .yml file, reload the plugin, and your new item is live.


πŸ“ File Structure

Each custom item file should be named as:

<item-id>.yml

Example:

heart_1.yml
scroll-strength.yml
magic-scroll.yml

The <item-id> is automatically used in placeholders like:

%criscore_cooldown_<item-id>%

Hyphens are converted to underscores (e.g. scroll-strength β†’ %criscore_cooldown_scroll_strength%).


βš™οΈ Basic Configuration Fields

name: "&6My Item Name"
material: PAPER
custom-model-data: 1234
lore:
  - "&7Line 1"
  - "&7Line 2"
glow: true
Hiders:
  - 'HIDE_ATTRIBUTES'
  - 'HIDE_ENCHANTS'
consume-use: true
cooldown: 60
cancel_place: false
disable_drop: true
disable_drop_message: "&cYou cannot drop this item!"
disable-world: [world1, world2]
Enchants:
  - PROTECTION,3

Explanation

  • name – Item display name (supports & color codes).

  • material – Bukkit material (e.g. DIAMOND, NETHER_STAR, or head-<texture> for custom heads).

  • custom-model-data – Optional. Used with resource packs for custom models.

  • lore – List of lore lines under the item.

  • glow – Gives the enchanted β€œshine” without an actual enchant.

  • Hiders – Bukkit ItemFlags to hide attributes/enchantments.

  • consume-use – Removes 1 item from stack on use.

  • cooldown – Global cooldown per player per item (in seconds).

  • disable_drop – Prevents dropping with Q.

  • disable_drop_message – Shown when dropping is blocked.

  • disable-world – Worlds where the item cannot be used.

  • permissions - Define permissions by item

  • enchants - Enchant items in a vanilla way.


βš”οΈ Activators

All item behaviors are defined in the activators: section.

activators:
  activator1:
    option: RIGHT_CLICK | LEFT_CLICK | DROP_ACTIVATE | ALL_CLICK
    sound: "ENTITY_PLAYER_LEVELUP"
    particles-success: "HEART"
    messages:
      when-using: "&aYou used the item!"
      on-cooldown: "&cCooldown: %criscore_cooldown_<item-id>%"
      denied_sound: "ENTITY_VILLAGER_NO"
      particles-denied: "VILLAGER_ANGRY"
    commands:
      - "effect give %player_name% minecraft:strength 60 1 true"
    extras-success:
      title:
        message: "&a&lSuccess!"
        fade-in: 5
        stay: 40
        fade-out: 10
      subtitle:
        message: "&7Buff applied!"
      actionbar:
        message: "&eYou feel stronger!"

Activator Types

Option
Description

RIGHT_CLICK

Triggers on right click.

LEFT_CLICK

Triggers on left click.

DROP_ACTIVATE

Triggers when pressing Q.

ALL_CLICK

Triggers on any click.


🎡 Sounds and Particles

Key
Example
Description

sound

"ENTITY_IRON_GOLEM_ATTACK"

Plays when successfully used.

particles-success

"CRIT"

Displays on success.

denied_sound

"ENTITY_VILLAGER_NO"

Plays when action denied.

particles-denied

"VILLAGER_ANGRY"

Shows when action denied.

πŸ’‘ Check EFFECTS_REFERENCE.txt for a full list of supported particle & sound names.


🧾 Commands and Placeholders

Commands are executed by console unless specified otherwise.

Examples:

commands:
  - "effect give %player_name% minecraft:strength 120 1 true"
  - "give %player_name% minecraft:experience_bottle 50"

Placeholders:

  • %player_name% β€” player’s username

  • %criscore_cooldown_<item-id>% β€” cooldown time left

  • Supports PlaceholderAPI placeholders


🧠 Requirements and Conditions

You can make items conditional with need-to-activate and money_requires.

need-to-activate:
  requirement1:
    conditions:
      - HEALTH,20
    messages:
      - "&cYou need at least &4❀20 health."
  requirement2:
    conditions:
      - WORLD_NAME,world
    messages:
      - "&cUse this only in world: &fworld"

money_requires:
  - BALANCE_VAULT,1000
  - BALANCE_COINS,1000
money_requires_messages:
  - "&cYou do not have enough balance!"

Supported Condition Keys

Key
Description

HEALTH,<min>

Minimum player health

ARMOR_POINTS,<min>

Minimum armor

WORLD_NAME,<name>

World restriction

IS_NIGHT, IS_RAINING, IS_ON_FIRE

Environment checks

BALANCE_VAULT,<amount>

Requires Vault balance

BALANCE_COINS,<amount>

Requires Coins system balance

Y_LEVEL,<minY>

Player’s Y β‰₯ min

REGION,<name>

Requires WorldGuard

All supported condition keys:
- KILLS,<min>              - Player kills (plugin stats)
- DEATHS,<min>             - Player deaths (plugin stats)
- OFFHAND_ITEM              - Must have any offhand item
- HAS_POTION_EFFECT         - Any active potion effect
- HAS_EFFECT_SPEED          - Specific potion effects also available:
- HAS_EFFECT_STRENGTH
- HAS_EFFECT_REGEN
- HAS_EFFECT_FIRE_RESISTANCE
- HAS_EFFECT_JUMP_BOOST
- IS_ON_FIRE                - Player burning
- IS_FROZEN                 - Frozen state (1.17+)
- IS_INVISIBLE              - Invisible (via effect)
- WORLD_NAME,<name>        - Exact world name
- BIOME,<biome>            - Current biome name
- REGION,<name>            - Requires WorldGuard; fails if WG not installed
- IS_UNDERWATER             - Eye is in water
- IS_IN_LAVA                - Standing in lava
- IS_ON_GROUND              - Standing on ground
- Y_LEVEL,<minY>           - Y coordinate >= value
- TIME_OF_DAY,<minTick>    - World time >= value (0..24000)
- IS_RAINING                - World is raining
- IS_NIGHT                  - Time between 13000 and 23000
- HEALTH,<min>
- MAX_HEALTH,<min>
- ARMOR_POINTS,<min>
- ATTACK_DAMAGE,<min>
- ATTACK_SPEED,<min>
- MOVEMENT_SPEED,<min>
- LUCK,<min>
- KNOCKBACK_RESISTANCE,<min>
- SATURATION,<min>
- FOOD_LEVEL,<min>
- LEVEL,<min>
- EXPERIENCE,<min>

If a requirement fails, the denied effects/messages and extras-denied (if defined) will trigger.


πŸ“‹ Admin Commands

Command
Description

/criscoreadmin give <item> <player> <amount>

Give custom item

/criscoreadmin take <item> <player> <amount>

Take custom item

These commands use the .yml item IDs (file names) directly.


πŸ’‘ Examples

Heart I (heart_1.yml)

name: "&cHeart &4I"
material: RED_DYE
lore:
  - "&7You will receive &c❀ 1 &7heart upon consumption."
  - "&eSecond click to activate"
  - "&7β˜…β˜†β˜†β˜†β˜†"
cooldown: 60
glow: true
consume-use: true
disable_drop: true
disable_drop_message: "&c&lCrisStealCore &7- &cYou cannot drop this precious heart!"
activators:
  example1:
    option: ALL_CLICK
    sound: "EXPERIENCE_ORB_PICKUP"
    particles-success: "HEART"
    execute-as: CONSOLE
    commands:
      - "criscoreadmin add healt %player_name% 1"
    messages:
      on-cooldown: "&cThis item is on cooldown &c{cooldown}&c!"
      denied_sound: "ENTITY_VILLAGER_NO"
      particles-denied: "VILLAGER_ANGRY"
      when-using: "&aYou consumed &cHeart I &aand received 1 heart!"

🧩 Tips & Common Issues

  • DROP_ACTIVATE vs disable_drop: Don’t set disable_drop: true if you want the Q key to activate the item.

  • Cooldown placeholders: File magic-scroll.yml β†’ %criscore_cooldown_magic_scroll%.

  • No reaction when using: Check for world restrictions, correct activator type, or invalid sound/particle keys.

  • Money checks: These only verify balance β€” they don’t deduct any currency.


You can create as many .yml item files as you want β€” every item is dynamically registered and ready to use.

Last updated