jojomaciel09
📎 1 file 10,856 chars
📄
pasted-code-1788569868995.txt
txt 378 lines
▶
Create a Minecraft server plugin that adds a Shard System. The goal is to make players choose a special shard when they first join the server, with each shard giving them 3 unique abilities.

Shards

When a player joins the server for the first time, randomly give them ONE of these shards:

🔥 Fire Shard
🌪️ Wind Shard
🟢 Warden Shard
🧪 Brewing Shard
⚔️ Sword Shard
🔱 Spear Shard
👻 Ghast Shard

The shard should be a unique Minecraft item with a custom name, lore, and preferably a custom model/data component so it looks different from normal Minecraft items.

Once a player receives a shard, save their shard permanently. They should never be able to receive a different shard unless an administrator manually changes it.

Shard Protection

The shard must be permanently bound to the player.

Players cannot drop their shard.
Players cannot put their shard into chests, shulker boxes, furnaces, hoppers, or other containers.
Players cannot lose the shard when they die.
When a player dies, their shard should NOT appear in their death drops.
When the player respawns, automatically give their shard back to them.
If their inventory is full when they respawn, safely handle the shard so it cannot be lost.
Prevent players from moving the shard into illegal storage.
If the shard somehow gets deleted or removed, restore it to the player automatically.
The shard should remain bound to the original player.
Abilities

Every shard has exactly 3 abilities.

Ability Unlock System

Each player starts with Ability 1 unlocked.

Ability 1:

Unlocked automatically when the player receives their shard.
Requires 0 player kills.

Ability 2:

Requires 2 player kills to unlock.
The player must kill 2 other players.
Once they reach 2 kills, Ability 2 permanently unlocks.

Ability 3:

Requires 5 player kills to unlock.
The player must have at least 5 total player kills.
Once they reach 5 kills, Ability 3 permanently unlocks.

Kills must be saved permanently, even if the player leaves the server.

Killing mobs should NOT count toward the ability unlocks. Only actual player kills should count.

Do not allow players to farm unlocks by repeatedly killing themselves or using exploits. Make sure the kill system properly detects legitimate player kills.

Ability Activation

Abilities should be activated by right-clicking with the player's shard.

Right-click = activate the currently selected/available ability.
Abilities should have a 10-second cooldown.
The cooldown should apply to each ability individually, or use a shared 10-second shard cooldown if that is easier to implement.
Players should receive a clear message/action-bar message when an ability is on cooldown.
Example: Ability on cooldown! 7 seconds remaining.
The player should receive visual/audio feedback when an ability activates.
Abilities should not activate if the player does not have the required unlock.
Prevent abilities from activating from simply clicking blocks if possible; detect the shard right-click cleanly.
Ability Selection

Because each shard has 3 abilities, add a simple way for players to choose which unlocked ability they want to use.

For example:

Sneak + right-click = switch between abilities.
Right-click = activate the selected ability.

Display the selected ability in the action bar.

Example:

Selected Ability: Fireball

Also show the player's progress:

Ability 2: 1/2 Kills
Ability 3: 1/5 Kills

Once an ability is unlocked, permanently save that unlock.

FIRE SHARD 🔥

Give the Fire Shard these abilities:

Ability 1 — Fireball

Shoot a fireball toward where the player is looking.

Deals damage to enemies.
Creates a small explosion on impact.
Does not cause massive terrain destruction.
Has a 10-second cooldown.
Ability 2 — Flame Dash

The player dashes forward while surrounded by flames.

Push the player forward quickly.
Damages enemies they collide with.
Sets enemies hit on fire.
Has a 10-second cooldown.
Requires 2 player kills.
Ability 3 — Inferno

Create a large circle of flames around the player.

Damages nearby enemies.
Sets nearby enemies on fire.
Creates fire particles and sound effects.
Lasts for a short amount of time.
Has a 10-second cooldown.
Requires 5 player kills.
WIND SHARD 🌪️
Ability 1 — Wind Blast

Launch a powerful gust of wind toward where the player is looking.

Knocks enemies backward.
Deals a small amount of damage.
Uses wind particles.
10-second cooldown.
Ability 2 — Wind Dash

Launch the player forward at high speed.

Gives the player a strong movement boost.
Can be used for combat or escaping.
Creates wind particles.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Tornado

Create a temporary tornado at the targeted location.

Pulls nearby enemies toward it or launches them upward.
Deals damage over time.
Has strong wind particles and sounds.
10-second cooldown.
Requires 5 player kills.
WARDEN SHARD 🟢
Ability 1 — Sonic Boom

Fire a Warden-style sonic attack in the direction the player is looking.

Damages enemies.
Passes through or affects enemies in a limited area.
Uses Warden sonic particles/sounds.
10-second cooldown.
Ability 2 — Darkness

Apply Darkness to nearby enemies.

Makes nearby enemies temporarily lose visibility.
Gives a Warden-themed visual effect.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Warden Rage

Temporarily empower the player.

Give Strength.
Give Resistance.
Give Speed.
Create Warden particles around the player.
Play a powerful Warden sound.
10-second cooldown.
Requires 5 player kills.
BREWING SHARD 🧪
Ability 1 — Healing Brew

Instantly heal the player.

Gives a burst of regeneration/instant health.
Plays potion effects and sounds.
10-second cooldown.
Ability 2 — Poison Brew

Throw a magical potion effect at nearby enemies.

Applies Poison.
Creates potion particles.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Master Brew

Temporarily gives the player several potion effects.

For example:

Strength
Speed
Regeneration
Resistance

Make the effects balanced and temporary.

10-second cooldown.
Requires 5 player kills.
SWORD SHARD ⚔️
Ability 1 — Sword Slash

Perform a powerful sword slash.

Damage enemies in front of the player.
Use sweep particles.
Play a sword attack sound.
10-second cooldown.
Ability 2 — Blade Dash

Dash toward the direction the player is looking.

Damage enemies hit during the dash.
Create sword/critical particles.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Sword Storm

Create several powerful sword strikes around the player or target area.

Deals significant damage.
Has dramatic particles.
Has a short duration.
10-second cooldown.
Requires 5 player kills.
SPEAR SHARD 🔱
Ability 1 — Spear Throw

Throw a magical spear projectile.

Travels toward the direction the player is looking.
Deals damage to the first enemy it hits.
Returns to the player or disappears safely.
10-second cooldown.
Ability 2 — Spear Charge

Charge forward with a powerful spear attack.

Launch the player forward.
Damage enemies hit.
Knock enemies backward.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Spear Rain

Summon multiple magical spears from the sky in a target area.

Spears fall around the selected location.
Damage enemies caught underneath.
Use lightning/spear particles for visual effects.
10-second cooldown.
Requires 5 player kills.
GHAST SHARD 👻
Ability 1 — Ghast Fireball

Shoot a powerful Ghast fireball.

Explodes on impact.
Damages nearby enemies.
Keep terrain destruction disabled or heavily limited.
10-second cooldown.
Ability 2 — Ghast Flight

Temporarily allow the player to fly or gain strong levitation.

Make it feel like a Ghast ability.
Add Ghast particles/sounds.
Make sure the player cannot abuse it to bypass server restrictions.
10-second cooldown.
Requires 2 player kills.
Ability 3 — Ghast Barrage

Fire multiple Ghast fireballs toward the direction the player is looking.

Create several explosions.
Damage enemies.
Use Ghast sounds and particles.
Limit terrain destruction.
10-second cooldown.
Requires 5 player kills.
Kill Tracking

Create a persistent kill counter for every player.

Example:

Shard Kills: 0

When the player gets their first kill:

Shard Kills: 1

At 2 kills:

§aAbility 2 Unlocked!

At 5 kills:

§6Ability 3 Unlocked!

Make sure kills and unlocked abilities are saved in persistent player data, preferably using the plugin's configuration/database system.

First Join

When someone joins for the first time:

Detect that they have never joined before.
Randomly select one of the 7 shards.
Give them their shard.
Save the shard permanently.
Unlock Ability 1.
Set their shard kill count to 0.
Tell them what shard they received.
Display their 3 abilities and their unlock requirements.

Example:

§6You received the §cFIRE SHARD§6!

§aAbility 1: Fireball — UNLOCKED
§7Ability 2: Flame Dash — 0/2 Kills
§7Ability 3: Inferno — 0/5 Kills

Admin Commands

Add administrator commands such as:

/shard give  

/shard set  

/shard reset 

/shard info 

/shard kills 

/shard unlock  

/shard reload

Only players with the appropriate permission should be able to use admin commands.

Important Requirements
Make the plugin optimized for multiplayer servers.
Prevent exploits and duplication.
Make all shard data persistent across restarts.
Make all kill counts persistent.
Make all ability unlocks persistent.
Make shards impossible for normal players to drop or store.
Make shards return automatically after death.
Make abilities work reliably with right-click.
Make the 10-second cooldown clear to the player.
Make all abilities balanced for PvP.
Prevent abilities from causing excessive server lag.
Prevent abilities from causing unwanted massive terrain destruction.
Make particle effects and sounds configurable.
Put important settings in a configuration file so server administrators can change damage, cooldowns, durations, and other values.
Make the code clean, organized, and easy to modify.
Include all required plugin files and configuration files.
Include clear installation instructions.
Make sure the plugin works on the target Minecraft server version and use the appropriate modern Bukkit/Paper API methods rather than deprecated methods where possible.

The final result should feel like a polished Minecraft PvP Shard System, where every player gets a random elemental/combat shard, starts with one ability, and unlocks their stronger abilities by getting player kills.
Kodari AI
KodariSep 5 at 1:09 am 3
ShardSystem
A Minecraft plugin that assigns players a random elemental shard on first join. Each shard grants three unique PvP abilities unlocked through player kills (0, 2, and 5 kills). Players right-click their shard to activate abilities, sneak-right-click to cycle selections, with a 10-second cooldown. Shards are permanently bound, cannot be dropped or stored, and auto-return on death. Includes persistent kill tracking, admin commands for management, and a fully configurable system.

I’ll create the plugin as a Paper/Gradle project with persistent shard profiles, protected bound items, kill-based unlocks, configurable abilities, admin commands, and installation documentation.

  1. Created the complete ShardSystem Paper plugin project.

  2. Added seven persistent, player-bound shard types with custom materials, lore, and model data.

  3. Added kill tracking, permanent ability unlocks at 2 and 5 kills, selection controls, cooldowns, and action-bar feedback.

  4. Implemented all shard abilities with configurable damage, radius, duration, particles, sounds, and non-destructive explosions.

  5. Added shard protection against dropping, container storage, hopper movement, death loss, despawning, unauthorized pickup, and duplication.

  6. Added administrator commands:

    • /shard give

    • /shard set

    • /shard reset

    • /shard info

    • /shard kills

    • /shard unlock

    • /shard reload

  7. Added persistent YAML storage, Gradle configuration, plugin metadata, XSeries dependency manifest, configuration, and installation instructions in README.md.

jojomaciel09

make the the shards do some damage but for the warden make it do more damage

Kodari AI
KodariSep 5 at 1:28 am 1

Updated the shard damage balance:

  • All shards already deal damage through their offensive abilities.

  • Warden Shard now deals more damage:

    • Sonic Boom: 10 damage

    • Darkness: applies Darkness and deals 4 damage

    • Warden Rage: deals 3 damage every 10 ticks within a 3-block radius

  • Warden damage values are configurable in config.yml, so you can adjust them without changing the code.

jojomaciel09

also make a xray shard and for the 1 ability make it where u can see iron and diamonds for 5 seconds and for the 2 ability make it where u can see every other ore exept ancient debris and for the 3 ability make it where u can see everysingle ore even the ancient debris for 3 seconds and for the cooldown make it 20 seconds

Kodari AI
KodariSep 5 at 1:39 am 2
  1. Add an Xray shard with three ore-vision abilities, durations, and a 20-second cooldown.

  2. Register its display/configuration and wire the ability behavior into the existing shard system.

Added the Xray Shard with:

  • Ability 1: See iron and diamond ores for 5 seconds.

  • Ability 2: See all standard ores except ancient debris.

  • Ability 3: See every ore, including ancient debris, for 3 seconds.

  • Cooldown: 20 seconds for all Xray abilities.

  • Added Xray shard item, display names, command support, random assignment, and configurable scan radius.

  • Uses temporary client-side block changes, so blocks are not actually changed in the world.

jojomaciel09

get rid of the xray shard and make it where u can move the shards around in your inventory

Kodari AI
KodariSep 6 at 6:49 am 1
  1. Remove the Xray shard from the shard type, item display, abilities, configuration, and any command/random-assignment paths.

  2. Remove the inventory restriction that prevents shard items from being moved normally.

  • Removed the Xray shard from the shard types, abilities, item names, and configuration.

  • Shards can now be moved normally within the player’s inventory using clicks, dragging, and hotbar swaps.

  • Shards remain protected from dropping, hopper transfers, despawning, and unauthorized pickup.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
README.md
settings.gradle
Code
19 1,183
src/main/java/com/kodari/shards/ShardPlugin.java
package com.kodari.shards;

import com.kodari.shards.command.ShardCommand;
import com.kodari.shards.data.DataManager;
import com.kodari.shards.listener.AbilityListener;
import com.kodari.shards.listener.CombatListener;
import com.kodari.shards.listener.JoinListener;
import com.kodari.shards.listener.ShardProtectionListener;
import com.kodari.shards.manager.AbilityManager;
import com.kodari.shards.manager.ShardManager;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;

public final class ShardPlugin extends JavaPlugin {
    private NamespacedKey shardKey;
    private NamespacedKey ownerKey;
    private DataManager dataManager;
    private ShardManager shardManager;
    private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        shardKey = new NamespacedKey(this, "shard_type");
        ownerKey = new NamespacedKey(this, "shard_owner");
        dataManager = new DataManager(this);
        shardManager = new ShardManager(this, dataManager);
        abilityManager = new AbilityManager(this, shardManager);

        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ShardProtectionListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);

        ShardCommand command = new ShardCommand(this);
        getCommand("shard").setExecutor(command);
        getCommand("shard").setTabCompleter(command);

        long interval = Math.max(20L, getConfig().getLong("settings.restore-interval-ticks", 100L));
        Bukkit.getScheduler().runTaskTimer(this, shardManager::restoreOnlineShards, interval, interval);
    }

    @Override
    public void onDisable() {
        if (abilityManager != null) {
            abilityManager.shutdown();
        }
        if (dataManager != null) {
            dataManager.saveAll();
        }
    }

    public NamespacedKey getShardKey() {
        return shardKey;
    }

    public NamespacedKey getOwnerKey() {
        return ownerKey;
    }

    public DataManager getDataManager() {
        return dataManager;
    }

    public ShardManager getShardManager() {
        return shardManager;
    }

    public AbilityManager getAbilityManager() {
        return abilityManager;
    }
}