LOPPYDBOY

Make a plugin where their should be 4 items

Kodari AI
KodariMay 9 at 6:51 pm 8,248 (v2)

I’ll create a custom items plugin with 4 unique special items.

CustomItemsPlugin
A custom items plugin featuring 4 unique special items with powerful abilities. Includes a Lightning Sword that strikes enemies with lightning, Speed Boots that grant enhanced movement, a Teleport Pearl for instant travel, and a Healing Wand to restore health to nearby players. Each item has custom lore, enchantments, and special effects. Fully configurable through config.yml with cooldown systems and permission-based access.

Project created successfully! This plugin features 4 custom items:

  1. Lightning Sword - Strikes enemies with lightning on hit (5s cooldown)

  2. Speed Boots - Grants Speed III when worn

  3. Teleport Pearl - Teleports to wherever you’re looking (10s cooldown, 50 block max)

  4. Healing Wand - Heals you and nearby players 5 hearts (15s cooldown, 5 block radius)

Each item has custom names, lore, enchantments, and special abilities. Use /customitems give <player> <item> to obtain them. All items are fully configurable in config.yml with customizable cooldowns, effects, and permissions.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 640
src/main/java/com/customitems/plugin/CustomItemsPlugin.java
package com.customitems.plugin;

import com.customitems.plugin.commands.CustomItemsCommand;
import com.customitems.plugin.listeners.ItemListener;
import com.customitems.plugin.managers.CooldownManager;
import com.customitems.plugin.managers.ItemManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CustomItemsPlugin extends JavaPlugin {

    private ItemManager itemManager;
    private CooldownManager cooldownManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cooldownManager = new CooldownManager();
        this.itemManager = new ItemManager(this);
        
        getCommand("customitems").setExecutor(new CustomItemsCommand(this));
        getServer().getPluginManager().registerEvents(new ItemListener(this), this);
        
        getLogger().info("CustomItemsPlugin has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("CustomItemsPlugin has been disabled!");
    }

    public String getMessage(String key) {
        String prefix = getConfig().getString("messages.prefix", "&8[&6CustomItems&8] &r");
        String message = getConfig().getString("messages." + key, "&cMessage not found: " + key);
        return colorize(prefix + message);
    }

    public String getMessageNoPrefix(String key) {
        String message = getConfig().getString("messages." + key, "&cMessage not found: " + key);
        return colorize(message);
    }

    public String colorize(String text) {
        return text.replace("&", "§");
    }
}