piee nuue

create a minecraft plugin

when a player join the server will get random elements 1.elementals Earth To Crumbling floor Water To Flooding Disaster Fire To Scourge world Air To Clouds Lightning To Thunderstorm

And each elemental can be upgrade by crafting a Divergent shard use 4 echo shards in top middle left middle right middle bottom middle right middle and 1 netherite in the middle and 4 nether stars in top left top right bottom left bottom right

  1. Divergent shard

right click to use the divergent shard and the user will have to wait for 15 minutes for the upgrade to complete and if the user died the shard will shatter and the user will have to craft it again also your location will be exposed

and the elementals item will be replaced not added

3.Abilities Earth CD 35 Item: Cobble stone (Unplaceable) right click to send a shockwave knockbacking everyone away and the knockback people slowness III for 15 seconds

Crumbling floor CD 45 item: deepslate stone (Unplaceable) Right click to make the surrounding in radius 50 blocks become a deepslate stone for 35 seconds and the person inside the radius will get slowness I until the radius 50 blocks in gone

Water CD 35 Item: Lapis Right click to spawn a water around (5 block radius) you that follow you around and the person that touch the water wil have half max hp

Flooding Disaster CD 45 Item: heart of the sea Right click to spawn a water around (15 block radius) you that follow you around and the person that touch the water wil have half max hp

Fire CD 35 Item: Resin clump right click to send a fireball infront of you

Scourge world CD 45 Item: Blaze Rod right click to send a 9 fireballs infront of you

Air CD 35 Item: Wind charge Right click to boost yourself up into the air 60 block and you can't take fall damage (when use the ability)

Cloud CD 45 Item: Bonemeal Right click to dash forward can use 5 times until cooldown

Lightning CD 35 Item: amethyst shard Right click to summon a lightning to the person around you in radius 20 blocks

Thunderstorm CD 45 Item: amethyst shard Right click to summon a lightning 7 times to the person around you in radius 70 blocks

And don't add ingame chat when use ability (ABILITY NOT WHEN UPGRADING DO NOT DO LIKE WHEN I USED LIGHTNING "You used the magic." NO DONT DO THIS)

Kodari AI
KodariNov 9 at 1:50 pm 2
ElementalAscension
Minecraft plugin granting players random elemental powers on join: Earth, Water, Fire, Air, or Lightning. Each element has two abilities with cooldowns (35s/45s) triggered by right-clicking specific items (unplaceable). Abilities include shockwaves, flooding water, fireballs, wind boosts, dashes, and lightning strikes with radius-based effects and debuffs. Elements upgrade via crafting a Divergent Shard using 4 Echo Shards, 1 Netherite, and 4 Nether Stars in a specific pattern. Right-clicking the shard starts a 15-minute upgrade timer; dying shatters it and exposes the player's location. Upgraded elements replace the base item. No chat messages on ability use.

I’ll build the elemental assignment, shard upgrade, and abilities together. Water abilities will last 10 seconds, since no duration was specified.

Created the elemental plugin with random assignments, Divergent Shard crafting and upgrades, and all ten abilities. Ability use sends no chat messages.

Water abilities last 10 seconds, and Earth’s shockwave has a 10-block radius; neither was specified. Upgrade progress persists across restarts, and an upgrading player’s location is broadcast periodically.

piee nuue

add action cooldown bar for every abilities and add /elements reroll (playername) for OP player

Kodari AI
KodariNov 9 at 1:53 pm 1
  1. Add action-bar cooldown feedback for each ability.

  2. Add an operator-only /elements reroll <playername> command.

[Generation stopped]

piee nuue

and add that the elementals cant be dropped or gone (when the players died too)

Kodari AI
KodariNov 9 at 1:55 pm 2
  1. Add action-bar cooldown feedback and the operator reroll command.

  2. Keep elemental items through drops and death.

  • Added action-bar cooldown timers for abilities.

  • Added /elements reroll <playername> for operators. The player must be online; rerolling resets their upgrade and cancels any upgrade in progress.

  • Prevented elemental items from being dropped or moved through inventories, and restore them after death.

piee nuue

and add effects particle for every abilities

Kodari AI
KodariNov 9 at 1:56 pm 1

I’ll add distinct particle effects to each elemental ability, including the upgraded variants.

Added particle effects to all elemental abilities, including upgraded variants. Ability use still sends no chat messages.

piee nuue

add descripttion to each abilities and add more particles to make it more and make it so you can change to another hotbar not just the first hotbar

Kodari AI
KodariNov 9 at 2:10 pm 4
  1. Add ability descriptions to elemental items.

  2. Enhance particles across abilities.

  3. Allow elemental items in any hotbar slot.

  • Added descriptions and cooldowns to elemental items.

  • Enhanced particles for every ability, including fireball and Air trails.

  • Allowed elemental items to be moved between inventory and hotbar slots. Upgrades and rerolls preserve the item’s slot; dropping and storing it remain blocked.

piee nuue

make the elemental fire deal 45 damage

Kodari AI
KodariNov 9 at 2:38 pm 2

I’ll set the base Fire ability’s direct fireball hit to 45 damage; Scourge World will keep its current damage.

The base Fire ability now deals 45 damage on a direct fireball hit, before armor and other reductions.

piee nuue

buff the damage of the base fire and the scourge world and buff fire ball explode radius to base 25 blocks scourge world 100 blocks and rework water both base and flooding disaster and buff lightning damage

Kodari AI
KodariNov 9 at 2:43 pm 1

How would you like the Water and Flooding Disaster abilities reworked?

Also, should the 25-block and 100-block fireball explosion radii destroy blocks, or only damage entities? I can choose the damage values for Fire and Lightning unless you have specific numbers in mind.

piee nuue

nerf damage base fire from 45 to 25 and make the scourge world to 45 damage

and add an explosion magic Item: Mace Name: Boom stick Right click to create a 60 block radius explosion

Upgrade to Nuclear head

Item: Mace Name: Boom stick Right click to create a 160 block radius explosion and shoot fireballs around the user

And add more particles to make it very very cool

you have to craft explosion magic by 4 netherite middle top right middle left middle bottom middle 4 gunpower in the corners 1 ancient debris in the middle

Kodari AI
KodariNov 9 at 3:16 pm 2
  1. Set Fire’s direct-hit damage to 25 and Scourge World’s to 45.

  2. Add craftable Explosion magic and its Divergent Shard upgrade, with dramatic particle effects.

  • Fire now deals 25 damage per direct hit; Scourge World deals 45.

  • Added the craftable Explosion Magic unlock. Right-click it to replace your current element with the Boom Stick, then use a Divergent Shard to upgrade it to Nuclear Head.

  • Added large particle effects and Nuclear Head’s radial fireballs. The blast damages entities but does not destroy blocks.

The earlier Fire explosion-radius and Lightning damage changes remain open, as does the Water rework; their behavior and damage values weren’t specified.

piee nuue

rework explosion crafting recipe make it way harder

Kodari AI
KodariNov 9 at 3:19 pm 1

I’ll make the recipe require Netherite Blocks, Nether Stars, and a Heavy Core.

Explosion Magic now requires:

  • 4 Nether Stars in the corners

  • 4 Netherite Blocks on the edges

  • 1 Heavy Core in the center

piee nuue

change the crumbling floor to make it more smoother and reduce the block radius to 35 blocks and add more particles and fix explosion crafting recipe

Kodari AI
KodariNov 9 at 3:42 pm 3
  1. Smooth Crumbling Floor, reduce its radius to 35 blocks, and enhance its particles.

  2. Fix the Explosion Magic recipe.

  • Crumbling Floor now spreads outward smoothly to a 35-block radius, with more particles.

  • Re-registers the Explosion Magic recipe on enable and unlocks it in players’ recipe books. The recipe still uses four Nether Stars, four Netherite Blocks, and a Heavy Core.

piee nuue

change the boom stick from mace to breeze rod and add description

Kodari AI
KodariNov 9 at 3:49 pm 1

I’ll switch both Boom Stick variants to Breeze Rods and update their descriptions.

Changed both Boom Stick variants to Breeze Rods and updated their descriptions. Existing items refresh when players rejoin.

piee nuue

you didnt change it the boom stick is still a mace change it to breeze rod

Kodari AI
KodariNov 9 at 3:54 pm 1

[Generation stopped]

piee nuue

you didnt change it the boom stick is still a mace change it to breeze rod the explosion magic change it to breeze rod and name it a boom stick and add a description

Kodari AI
KodariNov 9 at 3:57 pm 2

I’ll change the crafted Explosion Magic item itself—not just the ability item—to a Breeze Rod named Boom Stick, and update existing unlock items in players’ inventories.

The crafted Explosion Magic item is now a Breeze Rod named Boom Stick, with a description. Existing unlock items in players’ inventories update on join or plugin enable.

piee nuue

make it really destroy blocks

Kodari AI
KodariNov 9 at 4:00 pm 1

The generation was stopped before any content could be produced.

piee nuue

make the explosion magic really destroy blocks

Kodari AI
KodariNov 9 at 4:02 pm 1

I’ll make both Boom Stick blasts destroy terrain using Minecraft’s explosion mechanics. These will be highly destructive.

Explosion Magic and Nuclear Head now create real, block-destroying explosions. They use Minecraft’s explosion damage and can also hurt the caster.

Warning: These blasts are extremely powerful and may cause significant lag. Actual block destruction depends on terrain and blast resistance.

piee nuue

nerf the explosion radius and make right click have to hold and while hold right click it spawn 1 magic circle around you until the charge is full then you can release the magic and add more particles to the explosion magic and make it more smoother and change fire elemental item from resin to blaze poweder and both earth and crumbling world to firework star but in the crumbling world make it enchanted and buff the crumbling floor from slowness I to slowness III

Kodari AI
KodariNov 10 at 11:40 am 2
  1. Reduce the Boom Stick blast size and add a particle-rich charge circle.

  2. Change the Fire and Earth items, and increase Crumbling Floor’s slowness.

A Breeze Rod doesn’t provide a reliable hold-and-release signal to a server plugin. I’ll use right-click to charge, then right-click again to release once fully charged.

  • Reduced both explosion sizes and added a charge circle and more blast particles.

  • Changed Fire to Blaze Powder and both Earth items to Firework Stars; Crumbling Floor’s star is enchanted.

  • Crumbling Floor now applies Slowness III.

Boom Stick charging: Right-click to start charging, then right-click again after three seconds to release. A Breeze Rod can’t reliably detect a held right-click and release on the server. Blast size varies with terrain and blast resistance.

piee nuue

make it that when you're charging it make you walk slow and make the particles way cooler

Kodari AI
KodariNov 10 at 11:48 am 1

I’ll slow the player during charging and add rotating runes, spirals, and a brighter fully charged effect.

Boom Stick charging now applies Slowness II and displays rotating runes, spiraling particles, and a brighter effect when fully charged.

piee nuue

and make it that if you got hit while charging it remove 15% charge bar

Kodari AI
KodariNov 10 at 11:49 am 2

Each damaging hit from an entity now removes 15 percentage points of Boom Stick charge, down to a minimum of 0%.

piee nuue

make it that when you're charging it make you walk slower until you release the magic

Kodari AI
KodariNov 10 at 11:54 am 1

Charging now applies Slowness IV until you release the magic, even if you switch hotbar slots.

piee nuue

change it to Slowness II

Kodari AI
KodariNov 10 at 11:54 am 1

Boom Stick charging now applies Slowness II.

piee nuue

Change base water and flooding disaster from creating water around to shooting water in front of you

flooding disaster Shoot a bigger projectile

Kodari AI
KodariNov 11 at 3:52 pm 4

I’ll replace the surrounding water with forward-moving projectiles. Flooding Disaster’s projectile will be larger, and hits will retain the temporary max-health reduction.

Water now shoots a projectile forward; Flooding Disaster shoots a larger one. A hit halves the target’s maximum health for 10 seconds.

piee nuue

change from 10 seconds to 5 secounds and base water from half max hp to 7 max hp

Kodari AI
KodariNov 11 at 3:55 pm 1

I’ll set base Water’s target maximum health to 7 health points for 5 seconds. Flooding Disaster will still halve maximum health, also for 5 seconds.

  • Water: Limits the target to 7 maximum health points for 5 seconds.

  • Flooding Disaster: Halves maximum health for 5 seconds.

piee nuue

nerf base water its too op and make it slow player instead of remove their hp but flooding disaster make it slow them and half max hp

Kodari AI
KodariNov 11 at 3:59 pm 1

I’ll give both projectiles Slowness II for 5 seconds. Only Flooding Disaster will reduce maximum health.

  • Water: Applies Slowness II for 5 seconds without reducing health.

  • Flooding Disaster: Applies Slowness II and halves maximum health for 5 seconds.

Kodari can make mistakes. Review important code before using.
Files
src
Code
2 836
src/main/java/com/kodari/elementals/ElementalsPlugin.java
package com.kodari.elementals;

import com.cryptomorin.xseries.XAttribute;
import com.cryptomorin.xseries.XEnchantment;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.Vector;

public final class ElementalsPlugin extends JavaPlugin implements Listener {
    private enum Element {
        EARTH("Earth", "FIREWORK_STAR", "Crumbling Floor", "FIREWORK_STAR"),
        WATER("Water", "LAPIS_LAZULI", "Flooding Disaster", "HEART_OF_THE_SEA"),
        FIRE("Fire", "BLAZE_POWDER", "Scourge World", "BLAZE_ROD"),
        AIR("Air", "WIND_CHARGE", "Cloud", "BONE_MEAL"),
        LIGHTNING("Lightning", "AMETHYST_SHARD", "Thunderstorm", "AMETHYST_SHARD"),
        EXPLOSION("Explosion Magic", "BREEZE_ROD", "Nuclear Head", "BREEZE_ROD");

        final String name;
        final String material;
        final String upgradedName;
        final String upgradedMaterial;

        Element(String name, String material, String upgradedName, String upgradedMaterial) {
            this.name = name;
            this.material = material;
            this.upgradedName = upgradedName;
            this.upgradedMaterial = upgradedMaterial;
        }
    }

    private final Random random = new Random();
    private final Map<UUID, Long> cooldowns = new HashMap<>();
    private final Map<UUID, long[]> explosionCharges = new HashMap<>();
    private final Map<UUID, Integer> cloudUses = new HashMap<>();
    private final Set<UUID> noFall = new HashSet<>();
    private final Map<Block, BlockData> changedBlocks = new HashMap<>();
    private final Map<UUID, Double> reducedHealth = new HashMap<>();
    private final Map<UUID, Object> waterEffects = new HashMap<>();
    private NamespacedKey itemKey;
    private NamespacedKey recipeKey;

    @Override
    public void onEnable() {
        itemKey = new NamespacedKey(this, "elemental_item");
        recipeKey = new NamespacedKey(this, "divergent_shard");
        ShapedRecipe recipe = new ShapedRecipe(recipeKey, makeItem("ECHO_SHARD", "&dDivergent Shard", "shard"));
        recipe.shape("SES", "ENE", "SES");
        recipe.setIngredient('S', material("NETHER_STAR"));
        recipe.setIngredient('E', material("ECHO_SHARD"));
        recipe.setIngredient('N', material("NETHERITE_INGOT"));
        Bukkit.addRecipe(recipe);
        NamespacedKey explosionKey = new NamespacedKey(this, "explosion_magic");
        Bukkit.removeRecipe(explosionKey);
        ShapedRecipe explosionRecipe = new ShapedRecipe(explosionKey,
                makeExplosionUnlock());
        explosionRecipe.shape("SNS", "NHN", "SNS");
        explosionRecipe.setIngredient('S', material("NETHER_STAR"));
        explosionRecipe.setIngredient('N', material("NETHERITE_BLOCK"));
        explosionRecipe.setIngredient('H', material("HEAVY_CORE"));
        if (!Bukkit.addRecipe(explosionRecipe)) {
            getLogger().severe("Could not register the Explosion Magic crafting recipe.");
        }
        Bukkit.getPluginManager().registerEvents(this, this);
        for (Player player : Bukkit.getOnlinePlayers()) initialize(player);
        Bukkit.getScheduler().runTaskTimer(this, this::checkUpgrades, 20L, 20L);
        Bukkit.getScheduler().runTaskTimer(this, this::showCooldowns, 1L, 10L);
    }

    @Override
    public void onDisable() {
        for (Map.Entry<Block, BlockData> entry : changedBlocks.entrySet()) {
            entry.getKey().setBlockData(entry.getValue(), false);
        }
        changedBlocks.clear();
        for (UUID id : new HashSet<>(reducedHealth.keySet())) restoreHealth(id);
        saveConfig();
    }

    private org.bukkit.Material material(String name) {
        return XMaterial.matchXMaterial(name).map(XMaterial::parseMaterial)
                .orElseThrow(() -> new IllegalStateException("Missing material: " + name));
    }

    private ItemStack makeItem(String material, String name, String tag) {
        ItemStack item = new ItemStack(material(material));
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
        meta.getPersistentDataContainer().set(itemKey, PersistentDataType.STRING, tag);
        item.setItemMeta(meta);
        return item;
    }

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

    private ItemStack makeExplosionUnlock() {
        ItemStack item = makeItem("BREEZE_ROD", "&6Boom Stick", "explosion_unlock");
        ItemMeta meta = item.getItemMeta();
        List<String> lore = new ArrayList<>();
        lore.add(ChatColor.GOLD + "Explosion Magic");
        lore.add(ChatColor.GRAY + "Right-click to unlock Explosion Magic,");
        lore.add(ChatColor.GRAY + "replacing your current elemental.");
        lore.add(ChatColor.GRAY + "Charge and release a destructive blast.");
        lore.add(ChatColor.GRAY + "Upgrade with a Divergent Shard to Nuclear Head.");
        meta.setLore(lore);
        item.setItemMeta(meta);
        return item;
    }

    private String path(UUID id) { return "players." + id + "."; }
    private Element element(UUID id) { return Element.valueOf(getConfig().getString(path(id) + "element")); }
    private boolean upgraded(UUID id) { return getConfig().getBoolean(path(id) + "upgraded"); }

    private void initialize(Player player) {
        player.discoverRecipe(new NamespacedKey(this, "explosion_magic"));
        for (int i = 0; i < player.getInventory().getSize(); i++) {
            ItemStack item = player.getInventory().getItem(i);
            if ("explosion_unlock".equals(tag(item))) {
                ItemStack replacement = makeExplosionUnlock();
                replacement.setAmount(item.getAmount());
                player.getInventory().setItem(i, replacement);
            }
        }
        String path = path(player.getUniqueId());
        if (!getConfig().contains(path + "element")) {
            Element[] values = Element.values();
            getConfig().set(path + "element", values[random.nextInt(values.length - 1)].name());
            saveConfig();
        }
        giveAbility(player);
    }

    private void giveAbility(Player player) {
        UUID id = player.getUniqueId();
        Element element = element(id);
        boolean advanced = upgraded(id);
        int previousSlot = -1;
        for (int i = 0; i < player.getInventory().getSize(); i++) {
            if ("ability".equals(tag(player.getInventory().getItem(i)))) {
                if (previousSlot < 0) previousSlot = i;
                player.getInventory().setItem(i, null);
            }
        }
        ItemStack ability = makeItem(advanced ? element.upgradedMaterial : element.material,
                element == Element.EXPLOSION ? "&6Boom Stick" : "&b" + (advanced ? element.upgradedName : element.name), "ability");
        ItemMeta meta = ability.getItemMeta();
        if (element == Element.EARTH && advanced) {
            XEnchantment.matchXEnchantment("UNBREAKING").ifPresent(enchantment ->
                    meta.addEnchant(enchantment.getEnchant(), 1, true));
        }
        List<String> lore = new ArrayList<>();