Prince Og
📎 1 file 2,635 chars
📄
pasted-code-1788934432736.txt
txt 71 lines
▶
Create a complete, working **Paper 1.21.11 Minecraft plugin** using my existing 1.21.11 resource pack.

IMPORTANT:

* Do NOT use Oraxen, Ornix, ItemsAdder, or any external texture plugin.
* The resource pack is already made by me; the plugin must work with it directly.
* Base weapon: **Mace**.
* Use the correct 1.21.11 item-model system.
* Java 21.
* Every ability has a **20-second per-player cooldown**.

WEAPON:

* Custom Mace weapon.
* Correctly identify it using PersistentDataContainer/item components.
* Custom model must display correctly in hand, inventory and hotbar.
* Provide a command to give the weapon.

ABILITIES:

1. **Crown Breaker**

* Trigger when the player kills an entity with the custom Mace.
* Create an expanding circular effect around the player.
* Default radius: 15 blocks.
* Damage nearby valid targets.
* Do not hit the killed entity again.
* Do not hit the activating player.
* Red/white particles and suitable sound.
* Maximum affected targets configurable.
* Cooldown: 20 seconds.

2. **Sky Breaker**

* Activate with normal right-click.
* Find one living entity in the player's crosshair/direction.
* Configurable range.
* Launch the target approximately 50–80 blocks upward.
* Bring the target down at high speed.
* Deal impact damage when it reaches the ground.
* Add particles during the movement.
* Clean up safely if target dies, disconnects, changes world, or becomes invalid.
* Cooldown: 20 seconds.

3. **Blood Rush**

* Activate with Shift + Right-click.
* Requires configurable kill count, default 5 kills.
* Track kills separately for every player.
* Launch the player upward up to 15 blocks.
* During the active attack window, the next attack deals high configurable damage.
* Red particles and sound effects.
* Prevent repeated activation/hits unless configured.
* Cooldown: 20 seconds.
* Save kill progress safely.

GENERAL:

* Players and mobs must be configurable as targets.
* Separate cooldown for every player.
* Prevent duplicate triggers and exploits.
* No unnecessary repeating tasks or excessive particles.
* Handle player death, disconnect, reload and plugin shutdown safely.
* Save player data using UUIDs.
* Add `config.yml` for damage, cooldown, range, particles, sounds, kill requirements, permissions, etc.
* Include `plugin.yml`.
* Include complete Maven project and all Java classes.
* Make the project compile and load correctly on **Paper 1.21.11**.
* Give exact installation instructions and the exact weapon command.
* Do not replace or modify unrelated textures in my existing resource pack.
Kodari AI
KodariSep 9 at 6:22 am 2
MaceAbilities
A Paper 1.21.11 plugin adding three abilities to a custom Mace weapon using the item-model system. Crown Breaker triggers on kills, creating an expanding damaging shockwave with particles. Sky Breaker launches a targeted entity skyward then slams it down for impact damage. Blood Rush activates on shift-right-click, launching the player upward and empowering their next attack. All abilities have 20-second per-player cooldowns, configurable damage, ranges, target types, and kill requirements. Uses PersistentDataContainer for weapon identification, UUID-based data storage, and safe cleanup for invalid targets.

I’ll create the Maven project, resource-pack item model integration, persistent player data, command, listeners, cooldowns, and all three abilities with safe task cleanup.

Created the complete Paper 1.21.11 Maven plugin project.

Included

  • Java 21 Maven setup

  • Paper 1.21.11 API dependency

  • Custom Mace identified through PersistentDataContainer

  • 1.21 item model component using configurable model ID

  • /breaker give [player]

  • Crown Breaker

  • Sky Breaker

  • Blood Rush

  • Per-player ability cooldowns

  • Configurable players/mobs as targets

  • Configurable damage, range, sounds, particles, limits, and kill requirements

  • UUID-based persistent kill progress

  • Safe task cancellation on shutdown, death, disconnect, invalid targets, and world changes

  • plugin.yml

  • config.yml

  • Persistent player-data.yml

Installation

  1. Build the project with Java 21 and Maven:

Shell
mvn clean package
  1. Copy the generated JAR to:

Plain Text
/plugins/BreakerMace.jar
  1. Ensure your resource pack contains the model referenced by:

YAML
weapon:
  item-model: breaker:mace

The corresponding resource-pack file should be:

Plain Text
assets/breaker/items/mace.json
  1. Restart the server.

Give the weapon

Plain Text
/breaker give

Give it to another online player:

Plain Text
/breaker give PlayerName

Reload configuration:

Plain Text
/breaker reload

The plugin does not modify or replace any unrelated resource-pack textures.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
14 977
src/main/java/com/example/breakermace/BreakerMacePlugin.java
package com.example.breakermace;

import com.example.breakermace.ability.BloodRush;
import com.example.breakermace.ability.CrownBreaker;
import com.example.breakermace.ability.SkyBreaker;
import com.example.breakermace.command.BreakerCommand;
import com.example.breakermace.data.PlayerDataManager;
import com.example.breakermace.event.AbilityListener;
import com.example.breakermace.item.WeaponManager;
import com.example.breakermace.util.CooldownManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class BreakerMacePlugin extends JavaPlugin {
    private PlayerDataManager playerDataManager;
    private CooldownManager cooldownManager;
    private WeaponManager weaponManager;
    private CrownBreaker crownBreaker;
    private SkyBreaker skyBreaker;
    private BloodRush bloodRush;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.playerDataManager = new PlayerDataManager(this);
        this.cooldownManager = new CooldownManager(this);
        this.weaponManager = new WeaponManager(this);
        this.crownBreaker = new CrownBreaker(this);
        this.skyBreaker = new SkyBreaker(this);
        this.bloodRush = new BloodRush(this);

        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);
        BreakerCommand command = new BreakerCommand(this);
        if (getCommand("breaker") != null) {
            getCommand("breaker").setExecutor(command);
            getCommand("breaker").setTabCompleter(command);
        }
    }

    @Override
    public void onDisable() {
        if (crownBreaker != null) {
            crownBreaker.cancelAll();
        }
        if (skyBreaker != null) {
            skyBreaker.cancelAll();
        }
        if (bloodRush != null) {
            bloodRush.cancelAll();
        }
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public WeaponManager getWeaponManager() {
        return weaponManager;
    }

    public CrownBreaker getCrownBreaker() {
        return crownBreaker;
    }

    public SkyBreaker getSkyBreaker() {
        return skyBreaker;
    }

    public BloodRush getBloodRush() {
        return bloodRush;
    }
}