nxosneaky

make a plugin where there is 8 spiecal items each one with 2 different abilites and make it 10000x cool

Kodari AI
KodariAug 16 at 8:19 pm 2
ArtifactForge
ArtifactForge introduces eight legendary artifacts, each possessing two distinct active abilities triggered by left and right clicks. Every artifact features a custom 3D-modeled item, unique particle effects, cooldown systems, and upgradeable tiers. Abilities range from devastating AoE attacks and defensive barriers to teleportation, time manipulation, and elemental summons. The plugin includes a configurable cooldown manager, ability unlock progression, sound effects, and visual feedback via action bars and titles. Players can discover artifacts through custom loot tables, craft them with rare materials, or earn them from boss drops. A comprehensive permissions system controls artifact usage per rank, while an admin GUI allows configuration of all ability parameters, cooldowns, and particle effects in-game. The plugin integrates with PlaceholderAPI for leaderboard displays and supports both PvP and PvE environments with balanced damage scaling.
  1. Create the Gradle/plugin metadata and default configuration.

  2. Add the eight-item catalog and cross-version item factory.

  3. Add the ability engine with two distinct abilities per item, cooldowns, effects, combat, movement, and visuals.

  4. Register interaction listeners and admin commands for obtaining and listing items.

Created InfinityRelics, a Minecraft plugin featuring:

  • 8 legendary special items

  • 16 unique abilities — 2 per item

  • Custom colored names, lore, enchantment glints, and persistent item IDs

  • Combat abilities with damage, knockback, fire, lightning, freezing, poison, gravity, healing, teleportation, and time effects

  • Cross-version materials, sounds, particles, enchantments, and potions through XSeries

  • Per-ability cooldown system

  • /specialitems give <relic>

  • /specialitems give <player> <relic> [amount]

  • /specialitems list

  • Aliases: /si, /relics

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
9 728
src/main/java/com/kodari/infinityrelics/InfinityRelicsPlugin.java
package com.kodari.infinityrelics;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class InfinityRelicsPlugin extends JavaPlugin implements Listener, CommandExecutor, TabCompleter {
    private ItemFactory itemFactory;
    private AbilityEngine abilityEngine;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        itemFactory = new ItemFactory(this);
        abilityEngine = new AbilityEngine(this);
        Bukkit.getPluginManager().registerEvents(this, this);
        getCommand("specialitems").setExecutor(this);
        getCommand("specialitems").setTabCompleter(this);
        getLogger().info("Infinity Relics online: 8 relics, 16 abilities.");
    }

    @EventHandler
    public void onInteract(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND) {
            return;
        }
        SpecialItem relic = itemFactory.identify(event.getItem());
        if (relic == null) {
            return;
        }
        Action action = event.getAction();
        boolean rightClick = action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK;
        boolean leftClick = action == Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK;
        if (rightClick || leftClick) {
            event.setCancelled(true);
            abilityEngine.activate(event.getPlayer(), relic, rightClick);
        }
    }

    @EventHandler
    public void onInteractEntity(PlayerInteractEntityEvent event) {
        if (event.getHand() != EquipmentSlot.HAND) {
            return;
        }
        SpecialItem relic = itemFactory.identify(event.getPlayer().getInventory().getItemInMainHand());
        if (relic == null) {
            return;
        }
        event.setCancelled(true);
        abilityEngine.activate(event.getPlayer(), relic, true);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 0 || args[0].equalsIgnoreCase("list")) {
            sender.sendMessage(color("&d&lINFINITY RELICS &8— &f8 legendary items"));
            for (SpecialItem relic : SpecialItem.values()) {
                sender.sendMessage(color("&8• " + relic.getDisplayName() + " &7» &f"
                        + relic.getRightAbility() + " &8/ &f" + relic.getLeftAbility()));
            }
            return true;
        }
        if (!args[0].equalsIgnoreCase("give")) {
            sender.sendMessage(color("&cUsage: /" + label + " give [player] <relic> [amount]"));
            return true;
        }

        Player target;
        String relicName;
        int amount = 1;
        if (args.length >= 3) {
            target = Bukkit.getPlayerExact(args[1]);
            relicName = args[2];
            if (args.length >= 4) {
                amount = parseAmount(args[3]);
            }
        } else if (sender instanceof Player) {
            target = (Player) sender;
            relicName = args[1];
            if (args.length >= 3) {
                amount = parseAmount(args[2]);
            }
        } else {
            sender.sendMessage(color("&cConsole must specify a player."));
            return true;
        }

        SpecialItem relic = SpecialItem.fromId(relicName);
        if (target == null) {
            sender.sendMessage(color("&cThat player is not online."));
            return true;
        }
        if (relic == null) {
            sender.sendMessage(color("&cUnknown relic. Use /" + label + " list."));
            return true;
        }
        ItemStack item = itemFactory.create(relic);
        if (item == null) {
            sender.sendMessage(color("&cThis server has no compatible material for that relic."));
            return true;
        }
        item.setAmount(Math.max(1, Math.min(64, amount)));
        target.getInventory().addItem(item);
        String prefix = getConfig().getString("messages.prefix", "&8[&dInfinity Relics&8] &r");
        String message = getConfig().getString("messages.given", "&aGiven {item} to {player}.")
                .replace("{item}", relic.getDisplayName())
                .replace("{player}", target.getName());
        sender.sendMessage(color(prefix + message));
        return true;
    }

    private int parseAmount(String value) {
        try {
            return Integer.parseInt(value);
        } catch (NumberFormatException ignored) {
            return 1;
        }
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        if (args.length == 1) {
            return partial(args[0], Arrays.asList("give", "list"));
        }
        if (args.length == 2 && args[0].equalsIgnoreCase("give")) {
            List<String> names = new ArrayList<>();
            for (Player player : Bukkit.getOnlinePlayers()) {
                names.add(player.getName());
            }
            for (SpecialItem relic : SpecialItem.values()) {
                names.add(relic.getId());
            }
            return partial(args[1], names);
        }
        if (args.length == 3 && args[0].equalsIgnoreCase("give")) {
            List<String> ids = new ArrayList<>();
            for (SpecialItem relic : SpecialItem.values()) {
                ids.add(relic.getId());
            }
            return partial(args[2], ids);
        }
        return Collections.emptyList();
    }

    private List<String> partial(String input, List<String> options) {
        List<String> matches = new ArrayList<>();
        for (String option : options) {
            if (option.toLowerCase().startsWith(input.toLowerCase())) {
                matches.add(option);
            }
        }
        return matches;
    }

    private String color(String text) {
        return ChatColor.translateAlternateColorCodes('&', text);
    }
}