ahemed malik

make a mode with full cutom gear inculding armour sword picaxe axe bw aorrw shild wit custm powers like • Dash / Teleport Dash • Fireball Launcher • Vanishing Cloak / Invisibility • Item Magnet / Item Pull • Block Breaker (Axe/Fishing Rod) • Cupid Bow / Love Arrow • Speed Boots • Jumping Strength / Leap • Night Vision Helmet • Strength Sword • Resistance Chestplate • Conduit Power / Water Breathing • Levitation Spell • Lightning Strike Crossbow / Stormbringer and all usefull effect and custom structure and custom bosses and custom ores and custom diamonstin and custoom mobs

Kodari AI
KodariNov 7 at 6:04 am 1
MythicGear
MythicGear is a Minecraft plugin introducing fully customizable gear with unique powers. Players craft or obtain enchanted armor, swords, pickaxes, axes, bows, arrows, and shields, each with distinct abilities like Dash Teleport, Fireball Launcher, Vanishing Cloak, Item Magnet, Block Breaker, Cupid Bow, Speed Boots, Leap, Night Vision Helmet, Strength Sword, Resistance Chestplate, Conduit Power, Levitation Spell, and Lightning Strike Crossbow. The plugin adds custom ores, diamonds, structures, bosses, and mobs, creating a rich progression system. Custom mobs drop rare materials for crafting MythicGear, while custom bosses guard powerful loot in generated structures, offering an immersive adventure experience.
  1. Add the plugin entry point and /arcanegear commands for gear, the altar, custom mobs, and the boss.

  2. Implement custom equipment abilities, armor passives, Aetherite drops, and boss rewards.

Created the ArcaneGear plugin with 16 custom gear items and powers, including dash, fireballs, invisibility, item magnetism, Cupid arrows, leap, levitation, and lightning. It also adds an Arcane Altar structure, Arcane Stalker mobs, the Stormbound Warden boss with unique drops, and Aetherite Shards from diamond ore.

Use /arcanegear help for commands, /arcanegear give <player> all for the gear set, and /arcanegear altar, /arcanegear mob, or /arcanegear boss to create encounters.

Kodari can make mistakes. Review important code before using.
Files
src
Code
2 420
src/main/java/com/kodari/arcanegear/ArcaneGearPlugin.java
package com.kodari.arcanegear;

import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Player;
import org.bukkit.entity.SmallFireball;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

public final class ArcaneGearPlugin extends JavaPlugin implements Listener, CommandExecutor {
    private static final Map<String, String[]> GEAR = new HashMap<>();

    static {
        GEAR.put("dash_boots", new String[]{"NETHERITE_BOOTS", "Dash Boots", "Right-click to dash forward."});
        GEAR.put("fireball_launcher", new String[]{"BLAZE_ROD", "Fireball Launcher", "Right-click to launch a fireball."});
        GEAR.put("cloak", new String[]{"LEATHER_CHESTPLATE", "Vanishing Cloak", "Right-click to vanish for 8 seconds."});
        GEAR.put("magnet", new String[]{"NAUTILUS_SHELL", "Item Magnet", "Right-click to pull nearby drops to you."});
        GEAR.put("breaker_axe", new String[]{"DIAMOND_AXE", "Block Breaker Axe", "Right-click to instantly break the block you target."});
        GEAR.put("cupid_bow", new String[]{"BOW", "Cupid Bow", "Arrows charm creatures and heal players."});
        GEAR.put("speed_boots", new String[]{"DIAMOND_BOOTS", "Speed Boots", "Grants Speed while worn."});
        GEAR.put("leap_spell", new String[]{"FEATHER", "Leap Spell", "Right-click to leap forward."});
        GEAR.put("night_helmet", new String[]{"GOLDEN_HELMET", "Night Vision Helmet", "Grants Night Vision while worn."});
        GEAR.put("strength_sword", new String[]{"DIAMOND_SWORD", "Strength Sword", "Right-click for Strength; deals bonus damage."});
        GEAR.put("resistance_chestplate", new String[]{"DIAMOND_CHESTPLATE", "Resistance Chestplate", "Reduces incoming damage."});
        GEAR.put("conduit_helmet", new String[]{"TURTLE_HELMET", "Conduit Helmet", "Grants Water Breathing and Night Vision."});
        GEAR.put("levitation_spell", new String[]{"AMETHYST_SHARD", "Levitation Spell", "Right-click to float upward."});
        GEAR.put("stormbringer", new String[]{"CROSSBOW", "Stormbringer", "Right-click to call lightning on your target."});
        GEAR.put("arcane_pickaxe", new String[]{"DIAMOND_PICKAXE", "Arcane Pickaxe", "Right-click for Haste."});
        GEAR.put("guardian_shield", new String[]{"SHIELD", "Guardian Shield", "Right-click for a burst of Resistance."});
    }

    private final Map<String, Long> cooldowns = new HashMap<>();
    private org.bukkit.NamespacedKey gearKey;
    private org.bukkit.NamespacedKey arrowKey;
    private org.bukkit.NamespacedKey creatureKey;

    @Override
    public void onEnable() {
        gearKey = new org.bukkit.NamespacedKey(this, "gear");
        arrowKey = new org.bukkit.NamespacedKey(this, "cupid_arrow");
        creatureKey = new org.bukkit.NamespacedKey(this, "arcane_creature");
        Bukkit.getPluginManager().registerEvents(this, this);
        getCommand("arcanegear").setExecutor(this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 0 || args[0].equalsIgnoreCase("help")) {
            sender.sendMessage("&6ArcaneGear &7/arcanegear give <player> <all|gear> | altar | boss | mob".replace('&', '§'));
            return true;
        }
        switch (args[0].toLowerCase()) {
            case "give" -> {
                if (args.length < 3) {
                    sender.sendMessage("§cUsage: /arcanegear give <player> <all|gear>");
                    return true;
                }
                Player target = Bukkit.getPlayerExact(args[1]);
                if (target == null) {
                    sender.sendMessage("§cThat player must be online.");
                    return true;
                }
                if (args[2].equalsIgnoreCase("all")) {
                    GEAR.keySet().forEach(id -> giveItem(target, createGear(id)));
                    giveItem(target, createAetherite());
                    sender.sendMessage("§aGave the full ArcaneGear set to " + target.getName() + ".");
                } else if (GEAR.containsKey(args[2].toLowerCase())) {
                    giveItem(target, createGear(args[2].toLowerCase()));
                    sender.sendMessage("§aGave " + args[2] + " to " + target.getName() + ".");
                } else {
                    sender.sendMessage("§cUnknown gear. Use /arcanegear help.");
                }
                return true;
            }
            case "altar" -> {
                if (!(sender instanceof Player player)) {
                    sender.sendMessage("§cA player must create the altar.");
                    return true;
                }
                createAltar(player.getLocation());
                sender.sendMessage("§dThe Arcane Altar has been created.");
                return true;
            }
            case "boss" -> {
                if (!(sender instanceof Player player)) {
                    sender.sendMessage("§cA player must summon the boss.");
                    return true;
                }
                spawnBoss(player.getLocation());
                sender.sendMessage("§5The Stormbound Warden has been summoned!");
                return true;
            }
            case "mob" -> {
                if (!(sender instanceof Player player)) {
                    sender.sendMessage("§cA player must summon the creature.");
                    return true;
                }
                spawnArcaneMob(player.getLocation());
                sender.sendMessage("§bAn Arcane Stalker has appeared.");
                return true;
            }
            default -> {
                sender.sendMessage("§cUnknown subcommand. Use /arcanegear help.");
                return true;
            }
        }
    }

    private ItemStack createGear(String id) {
        String[] data = GEAR.get(id);
        ItemStack item = new ItemStack(material(data[0]));
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("§d" + data[1]);
        meta.setLore(Arrays.asList("§7Arcane equipment", "§f" + data[2], "§8Unique bound gear"));
        meta.getPersistentDataContainer().set(gearKey, PersistentDataType.STRING, id);
        item.setItemMeta(meta);
        return item;
    }

    private ItemStack createAetherite() {
        ItemStack item = new ItemStack(material("PRISMARINE_CRYSTALS"));
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("§bAetherite Shard");
        meta.setLore(List.of("§7A rare crystal found in diamond veins.", "§dArcane crafting material"));
        meta.getPersistentDataContainer().set(gearKey, PersistentDataType.STRING, "aetherite");
        item.setItemMeta(meta);
        return item;
    }

    private void giveItem(Player player, ItemStack item) {
        Map<Integer, ItemStack> leftovers = player.getInventory().addItem(item);
        leftovers.values().forEach(stack -> player.getWorld().dropItemNaturally(player.getLocation(), stack));
    }

    private String gearId(ItemStack item) {
        if (item == null || !item.hasItemMeta()) return null;
        return item.getItemMeta().getPersistentDataContainer().get(gearKey, PersistentDataType.STRING);
    }

    @EventHandler
    public void onInteract(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND || !event.getAction().isRightClick()) return;
        Player player = event.getPlayer();
        String id = gearId(event.getItem());
        if (id == null || id.equals("cupid_bow") || id.equals("speed_boots") || id.equals("night_helmet")
                || id.equals("resistance_chestplate") || id.equals("conduit_helmet")) return;
        if (!ready(player, id)) return;

        switch (id) {
            case "dash_boots" -> {
                Vector direction = player.getLocation().getDirection().normalize().multiply(2.0);
                direction.setY(Math.max(0.25, direction.getY()));
                player.setVelocity(direction);
                player.sendMessage("§dYou dash forward!");
                setCooldown(player, id, 1800);
            }
            case "fireball_launcher" -> {
                SmallFireball fireball = player.launchProjectile(SmallFireball.class);
                fireball.setIsIncendiary(true);
                fireball.setYield(2.0f);
                player.sendMessage("§6Fireball launched!");
                setCooldown(player, id, 4000);
            }
            case "cloak" -> {
                apply(player, "INVISIBILITY", 160, 0);
                player.sendMessage("§7You vanish for 8 seconds.");