_

Goal version - 1.21.11 java

Act as an senior papar plugin developer and develop a Minecraft plugin named DXP using the concept provide below

First credits - all the developing credits and the acii banner in console startup and in chat the server is developed by deadly_xplayz

Now let's start the plug in concept

STARTING - when any player joints first time SMP he will get a ecoshard named your power and when the player right clicks the ECHO SHARD animation rolls on his screen means with titles and subtitles all the 20 powers which are exist in my server will role on his screen means ritual for 20 seconds ,. After ritual he will get a after rolling he will get a random power item from the 20 powers

What are power items??

Power items are a type of power which are granted to the player after the animation rolling on the first join there are total 20 power items in the plug in every power item has a different abilities one passive power and one active power passive power is always on and active power is only activated through right clicking right clicking and shift pressing on keyboard or anything

Protection for power items (imp)

Power item must be protected it can't be placed it can't be thrown it can't be brake it can't be stored in any storable things means in chest and the ender , shulker frames etc it can only stored in player inventory and only can moveed in player inventory

What are the powers?

All the powers are mentioned below 👇

Blood Passive: Every hit has a 15% chance to inflict bleeding for 6 seconds.

Ability: All untrusted players in a radius of 8 blocks around the player lose 2.5 hearts for 4 seconds and take 2.5 hearts of an extra tick for 5 seconds.

Ocean Passive: Every 4th hit the enemy starts to drown and gets slowness 1 for 3 seconds.

Ability: Give all untrusted players in a radius of 10 blocks mining fatigue and drowning for 7 seconds.

Glide Passive: When falling for 5 blocks, you start a flight for 8 seconds.

Ability: Sends the player forward in the direction they are looking and get elytra flight for 10 seconds, but with a firework rocket boost until seconds are up.

Health Passive: Permanent 15 hearts.

Ability: Steals 2 hearts from all untrusted players in a 6 block radius for 5 seconds.

Hop Card Passive: Double Jump.

Ability: Launches player 12 blocks up and forward and where ever they land all untrusted players get 4 blocks in the air.

Phase Passive: Have a 20% chance to take no damage from an attack and give that player slowness 2 for 3 seconds.

Ability: When used go into spectator mode for 5 seconds.

Shadowstep Passive: When hitting a player have a 10% chance to teleport around them 3 times and deal 1 heart each teleport.

Ability: All attacks do no damage and reflect on to the attacker for 6 seconds.

Spider Passive: Movement in cobwebs is 50% faster.

Ability: Spawn cobwebs underneath all untrusted players' feet in a radius of 7 blocks; these cobwebs give darkness and blindness for 8 seconds and cannot be broken for 10 seconds.

Spotlight Passive: All untrusted players in a 15 block radius get glowing.

Ability: All untrusted players in a 15 block radius get glowing and slowness 3 for 6 seconds; when looking at a glowing player and using the card again, fire them to you.

Resurrection Passive: Each kill increases Resurrection by 5%.

Ability: Untrusted players nearby lose helmets and get Slowness 1; each hit on enemies grants you Speed 1 & Strength 1 for 12 seconds.

Villager Passive: Permanent Hero of the Village 25 and 12 hearts.

Ability: All untrusted players in a radius of 8 blocks get slowness 2 and darkness 2 for 5 seconds; 3 Iron Golems spawn and attack all untrusted players for 15 seconds.

Vindicator Passive: Every hit brings the victim closer to you.

Ability: Ride a Ravager that attacks when you attack; deals extra damage for 20 seconds.

Conductor Passive: Every 6th hit strikes lightning that deals 2.5 hearts.

Ability: Strikes all untrusted players in a 10 block radius with lightning 3 times for 5 seconds.

Dragon Passive: Permanent Speed 3 and Strength 2.

Ability 1: Summon black and purple rings in a radius of 12 blocks; all untrusted players inside get withering 3 for 8 seconds.

Ability 2: All untrusted players in a 10 block radial take 1 heart of damage each tick for 6 seconds.

Freeze Passive: Every 5th hit gives the enemy slowness 2 for 4 seconds.

Ability: Summons rings in a radius of 9 that gives all untrusted players inside slowness 4 for 7 seconds.

Alchemist Passive: All positive potion effects last 45 seconds longer.

Ability: All positive potion effects go up by 1 level for 20 seconds.

Feather Passive: No fall damage; mace-style attack mechanics enabled.

Ability: Fast dash forward for 2 seconds.

Dismantle Passive: Every 7 hits, swaps 2 items in the enemies' hotbar around.

Ability: Locks the item the player is holding for 4 seconds.

Solitaire Passive: Every 5th hit, inflict the enemy with blindness and darkness 2 for 6 seconds.

Ability: Card randomly buffs/swaps every 10 seconds for a total of 3 times

I have provided you 14 powers and you can create remaining power yourself at must be good every single power are described by and rear Minecraft item in example we create a power called void power and describe it as ecoshard means it's item is ecosyd hope you understand

The leveling system

After rolling player get his item or a power item which was on level 1 the level of a powers increased by killing players there are total Max 25 levels which can increased by kills

what this level gives advantage ?

When the power item is leveld up the cool down where decrease and the power will increase and the or a particle also increase

The life system (most imp)

In the starting of SMP or when any new player joints he will get only 5 life which are displayed on his action bar must be displayed please don't make it an ignorable action bar must contains power name and power level and total lives

What are the use of lives why lives are important??

Live place an important role in server let me explain you by an example think about player a and player b player be is killed four times means his four likes are gone now he has only one life when the player be kills player a finally the player is a lies are gone and his power item will be given to his killer means to the player be for the 24 hour after 24 hours player a is online or offline he will get his power back until he does not have any power players can hold maximum 10 powers means they can eliminate 10 powers and get all the powers for 24 hours

The particles and animation for the SMP the most heaviest feature (imp)

After rolling player get his custom item I mean power item with power item he will get a Aura of custom particles that stays around the player every time or a must be in different different shapes like spiral circle etc

On triggering any passive power and custom aura or custom particle also fired on enemy means a laser from the eyes or circle in the ground etc means every power has different particles and different auras which can be activated on right clicking power item in activating passive power hope you understand particles must be in different different shapes not in same shape every every single shape has the detailed integration

Kodari AI
KodariMay 12 at 9:54 am 40,813 (v2)

I’ll design this comprehensive plugin carefully before writing any code.

Planning:

  • 20 powers with passive/active abilities, each as a protected custom item

  • First-join ritual animation (20s title scroll), random power assignment

  • Life system (5 lives, displayed on action bar with power name + level)

  • Power leveling (1-25, kill-based, affects cooldown/strength/particles)

  • Power item protection (no drop, no place, no chest storage)

  • Aura particles per power (unique shapes: spiral, circle, helix, etc.)

  • Power transfer on death (24h timer)

  • GUIManager inventory framework for any future GUIs

DXP
DXP is a Minecraft SMP power system plugin. On first join, players receive a ritual animation revealing one of 20 unique power items. Each power has a passive and active ability, a leveling system (1–25 via kills), and a life system (5 lives). Killing a player steals their power for 24 hours. Power items are fully protected and emit unique particle auras. Developed by deadly_xplayz.

Let me now plan all classes before writing:

Class dependency map:

  • DXP (main) → all managers

  • PowerType (enum, 20 powers)

  • PowerLevel (data per level: cooldown, damage multiplier)

  • PlayerData (UUID, PowerType, level, lives, heldPowers, cooldowns)

  • PlayerDataManager → manages PlayerData, persistence

  • PowerManager → handles passive/active triggers

  • LifeManager → life tracking, power transfer

  • RitualManager → first-join animation

  • AuraManager → per-player particle tasks

  • ActionBarManager → continuous action bar display

  • PowerItem → builds protected ItemStacks for each power

  • PowerListener → join, interact, damage, inventory events

  • AuraTask → BukkitRunnable per player

  • CooldownManager → tracks active ability cooldowns

  • TrustManager → tracks trusted players (for “untrusted” checks)

  • inventory/ framework classes

Here’s a summary of everything built:

DXP Plugin — Complete Feature Set:

  • 20 Powers — All 19 specified + VOID (custom): each has a unique item material, colored name, passive description, and active description stored in PowerType enum

  • Ritual System — First-join 20-second title animation cycling through all 20 powers with chime sounds, then assigns a random power item

  • Power Item Protection — Cannot drop, place, store in chests/ender chests/shulkers, or move to external inventories; enforced via InventoryClickEvent, PlayerDropItemEvent, BlockPlaceEvent

  • Passive Abilities — All 20 passives implemented: bleeding, drowning, glide flight, health steal, double jump, phase dodge, shadowstep teleport, spider cobweb speed, spotlight glow, resurrection buffs, villager golems, vindicator pull, conductor lightning, dragon wither, freeze slow, alchemist extension, feather no-fall, dismantle hotbar swap, solitaire blindness, void pull-down

  • Active Abilities — All 20 actives implemented with cooldowns that scale down per level

  • Life System — 5 lives displayed on action bar as ❤ hearts; death removes a life; 0 lives = power stolen by killer for 24 hours; auto-return after 24h

  • Action Bar — Persistent display: PowerName | Lv.X | ❤ ❤ ❤ ❤ ❤

  • Leveling — 1–25 levels via kills (5 kills/level); each level reduces cooldown by 0.5s and scales passive strength

  • Unique Auras — 7 distinct particle shapes (circle, spiral, helix, web, bounce, lightning, dragon/void special) per power with continuous global task

  • Trust System — /trust and /untrust commands; all abilities only affect untrusted players

  • Commands — /dxp, /trust, /untrust, /lives, /power

  • Credits — ASCII banner on startup, deadly_xplayz credited in all power items and console

_

Iam getting this errors

1 image attached
Kodari AI
KodariMay 12 at 10:30 am 4,742 (v2)

Let me read the AuraManager file to diagnose the issue.

The error is IllegalAccessError: class AuraManager$1 tried to access private field AuraManager.globalAngle. This happens because the anonymous BukkitRunnable inner class (compiled as AuraManager$1) cannot access the private field globalAngle in newer Java module systems (Java 16+ with strong encapsulation).

The fix is to change globalAngle from private to package-private (no modifier).

Changed globalAngle from private to package-private — on Java 16+ with the module system, anonymous inner classes (compiled as AuraManager$1) cannot access private fields of their enclosing class when loaded from a shaded jar, causing the IllegalAccessError.

_

After clicking Echo shard that player got on joining no ritual or screen animation is performing please fix all issues

Kodari AI
KodariMay 12 at 10:37 am 40,776 (v2)

Let me read all the relevant files to understand the full flow.

Now let me read the PowerListener and PlayerDataManager to understand the full flow:

Now I have a full picture of all the issues. Let me trace the exact problems:

  1. Echo Shard click does nothing — onPlayerInteract checks PowerItem.isPowerItem(plugin, item) but the echo shard given during ritual is NOT a power item (no PDC tag). It’s just a plain echo shard with a display name. There’s no listener for clicking the ritual shard.

  2. Ritual animation is broken — startRitual gives the echo shard AND immediately starts the title animation. The shard click should trigger the ritual, not just joining. The player needs to click the shard to start the animation.

  3. inRitual check blocks the click — onPlayerInteract returns early if isInRitual, so even if we fix the shard detection, the animation titles would be blocked.

  4. Sound uses raw Sound enum — should use XSeries for cross-version safety.

  5. finishRitual removes echo shard by iterating and calling item.setAmount(0) — iterating forEach and mutating amount is unreliable; should use removeItem or set slot to null.

The fix: give the ritual echo shard a PDC tag (dxp_ritual_shard) so it can be detected, add a handler in PowerListener that triggers the ritual animation on right-click of that shard, and restructure startRitual so clicking the shard starts the spinning title sequence.

Now update PowerListener to: call giveRitualShard on first join, handle ritual shard right-click, and protect the ritual shard from being dropped:

Now fix the onPlayerInteract handler — the isInRitual guard must only block power item usage, not the ritual shard (which is already handled above and returns early). The existing guard is fine since we return before reaching it for ritual shards. But we also need to remove the isInRitual early-return that would block the power item right-click during ritual (it’s correct to keep it for power items). Let me verify the current state of that section:

The file looks correct. Now fix the RitualManager — the playSound call inside the lambda uses a raw Sound.valueOf() which can throw on older versions. Let me clean that up properly:

Here’s a summary of every bug that was fixed:


Root Causes & Fixes

1. Echo Shard click did nothing (main bug)

  • The shard given on join had no PDC tag, so PowerItem.isPowerItem() returned false and onPlayerInteract ignored it entirely

  • Fix: giveRitualShard() now stamps the shard with a dxp_ritual_shard PDC key. isRitualShard() detects it. onPlayerInteract now has a dedicated early block that catches ritual shard right-clicks and calls startRitual()

2. Ritual started immediately on join instead of on click

  • onFirstJoin was calling startRitual() directly, launching the title animation before the player even loaded in

  • Fix: onFirstJoin now calls giveRitualShard() which just gives the item + shows a prompt title. The animation only starts when the player right-clicks the shard

3. isInRitual guard blocked the shard click

  • The onPlayerInteract handler had if (isInRitual) return which would have blocked a second click mid-ritual — but since the shard check now returns before reaching that guard, it’s correctly isolated

4. Echo shard removal was broken

  • forEach + item.setAmount(0) on inventory items is unreliable (modifying a live iterator)

  • Fix: startRitual() now loops with an index and calls player.getInventory().setItem(i, null) directly

5. Raw Sound enum usage

  • Sound.BLOCK_AMETHYST_BLOCK_CHIME and Sound.UI_TOAST_CHALLENGE_COMPLETE throw on versions where the enum name differs

  • Fix: All sounds now go through XSound.matchXSound(...).ifPresent(s -> s.play(...)) with proper pitch via XSound’s play API

_

Still rolling is not occuring and no titles flashing on screen

Kodari AI
KodariMay 12 at 10:45 am 100 (v2)

The generation was stopped before any content could be produced.

_

Still rolling is not occuring and no titles flashing on screen

Kodari AI
KodariMay 12 at 10:47 am 22,139 (v2)

Let me read all the relevant files fresh to diagnose exactly what’s happening.

Now let me read PowerType and AuraManager to see what methods are being called:

Now I have a complete picture. I can see exactly what’s broken. Let me trace the full flow:

Root causes:

  1. PlayerJoinEvent fires before the player is fully loaded — calling giveRitualShard and sendTitle inside onFirstJoin directly (tick 0) means the client hasn’t finished loading. Titles and inventory changes are silently dropped. Must delay with runTaskLater.

  2. startRitual timer is 20L ticks per cycle (1 second) for only 20 ticks = 20 seconds total — but the rolling effect needs to be FAST (every 3-5 ticks) to look like it’s spinning through powers. At 20L delay it barely shows anything.

  3. XSound.play(player) with no pitch/volume — the overload s.play(player) uses default settings which may not work correctly; the location-based play is used inconsistently.

  4. isRitualShard(item) is called where item can be null — event.getItem() returns null when clicking air with nothing in hand, causing a NPE path (though isRitualShard handles null, the flow is fragile).

  5. onFirstJoin runs for ALL joins, not just first join — the name is misleading but the !data.isHasReceivedPower() check is correct. However the delay issue is the critical bug.

Now rewrite RitualManager with the correct fast-rolling timer and proper sound calls:

Here’s exactly what was wrong and what was fixed:


Bugs Fixed

1. Titles/items sent before client finished loading (main bug)

  • PlayerJoinEvent fires server-side while the client is still loading chunks. Any sendTitle or addItem call at tick 0 is silently dropped by the client.

  • Fix: onFirstJoin now wraps the giveRitualShard call in runTaskLater(..., 40L) — a 2-second delay that guarantees the client is fully loaded before receiving the title and item.

2. Rolling was imperceptibly slow (20 ticks = 1 second per power)

  • The old timer ran every 20L ticks with only 20 frames — one power shown per second, barely visible as “rolling”.

  • Fix: Timer now runs every 4L ticks for 40 frames = 8 seconds of fast spinning. Each title has fadeIn=0, stay=6, fadeOut=0 so frames snap instantly with no blending.

3. Pitch calculation used raw Sound enum via s.play(location, vol, pitch)

  • XSound.play(location, vol, pitch) doesn’t exist on all XSeries versions. The correct API is player.playSound(location, s.parseSound(), vol, pitch).

  • Fix: All sound calls now use player.playSound(player.getLocation(), s.parseSound(), vol, pitch).

4. Final power was random at finishRitual time, not locked in advance

  • The old code picked the power after the animation, so the last frame shown could differ from what was assigned.

  • Fix: finalPower is chosen before the loop starts. The last 8 frames converge on it, and finishRitual receives it directly — what you see is what you get.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
26 2,998
src/main/java/com/deadlyxplayz/dxp/DXP.java
package com.deadlyxplayz.dxp;

import com.deadlyxplayz.dxp.commands.DXPCommand;
import com.deadlyxplayz.dxp.commands.LivesCommand;
import com.deadlyxplayz.dxp.commands.PowerCommand;
import com.deadlyxplayz.dxp.commands.TrustCommand;
import com.deadlyxplayz.dxp.commands.UntrustCommand;
import com.deadlyxplayz.dxp.inventory.gui.GUIListener;
import com.deadlyxplayz.dxp.inventory.gui.GUIManager;
import com.deadlyxplayz.dxp.listeners.PowerListener;
import com.deadlyxplayz.dxp.managers.ActionBarManager;
import com.deadlyxplayz.dxp.managers.AuraManager;
import com.deadlyxplayz.dxp.managers.CooldownManager;
import com.deadlyxplayz.dxp.managers.LifeManager;
import com.deadlyxplayz.dxp.managers.PlayerDataManager;
import com.deadlyxplayz.dxp.managers.PowerManager;
import com.deadlyxplayz.dxp.managers.RitualManager;
import com.deadlyxplayz.dxp.managers.TrustManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class DXP extends JavaPlugin {

    @Getter private static DXP instance;

    @Getter private PlayerDataManager playerDataManager;
    @Getter private PowerManager powerManager;
    @Getter private LifeManager lifeManager;
    @Getter private RitualManager ritualManager;
    @Getter private AuraManager auraManager;
    @Getter private ActionBarManager actionBarManager;
    @Getter private CooldownManager cooldownManager;
    @Getter private TrustManager trustManager;
    @Getter private GUIManager guiManager;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();

        printBanner();

        this.playerDataManager = new PlayerDataManager(this);
        this.cooldownManager = new CooldownManager();
        this.trustManager = new TrustManager(this);
        this.powerManager = new PowerManager(this);
        this.lifeManager = new LifeManager(this);
        this.ritualManager = new RitualManager(this);
        this.auraManager = new AuraManager(this);
        this.actionBarManager = new ActionBarManager(this);
        this.guiManager = new GUIManager();

        playerDataManager.loadAll();
        trustManager.loadAll();

        Bukkit.getPluginManager().registerEvents(new PowerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        getCommand("dxp").setExecutor(new DXPCommand(this));
        getCommand("trust").setExecutor(new TrustCommand(this));
        getCommand("untrust").setExecutor(new UntrustCommand(this));
        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("power").setExecutor(new PowerCommand(this));

        actionBarManager.startTask();
        auraManager.startGlobalTask();

        getLogger().info("DXP has been enabled! Developed by deadly_xplayz");
    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) playerDataManager.saveAll();
        if (trustManager != null) trustManager.saveAll();
        auraManager.stopAll();
        getLogger().info("DXP has been disabled.");
    }

    private void printBanner() {
        String[] banner = {
            "",
            "§5  ██████╗ ██╗  ██╗██████╗ ",
            "§5  ██╔══██╗╚██╗██╔╝██╔══██╗",
            "§5  ██║  ██║ ╚███╔╝ ██████╔╝",
            "§5  ██║  ██║ ██╔██╗ ██╔═══╝ ",
            "§5  ██████╔╝██╔╝ ██╗██║     ",
            "§5  ╚═════╝ ╚═╝  ╚═╝╚═╝     ",
            "§d  Developed by §5deadly_xplayz",
            "§d  Version §51.0.0",
            ""
        };
        for (String line : banner) {
            Bukkit.getConsoleSender().sendMessage(line);
        }
    }
}