citanz.
📎 1 file 4,737 chars
📄
pasted-code-1784282032436.txt
txt 135 lines
▶
Plugin Concept: The God Smasher

Create a Minecraft Paper 1.21.11 plugin that adds a custom legendary mace called "The God Smasher."

Weapon Details
Item Type: Mace
Display Name: The God Smasher (gold or custom colored)
Enchantments:
Sharpness V
Density V
Wind Burst III
Looting III
Smite IV
Breach IV
Lore:
Hold Right-Click for Wind Boost
Crafting Recipe

The God Smasher should only be obtainable through a custom crafting recipe using:

4 Netherite Ingots
1 Netherite Spear
1 Mace
1 Netherite Sword
1 Nether Star
1 Netherite Upgrade Smithing Template

Important:

Use the official Paper 1.21.11 Material enum for the Netherite Upgrade Smithing Template.
Do NOT use Material.UPGRADE_SMITHING_TEMPLATE.
Do NOT invent or guess Material names.
Verify that every Material enum used exists in the official Paper 1.21.11 API before generating the code.
Admin Command

Add an administrator-only command:

/creategodsmasher

Command Features
Gives the executing player 1× The God Smasher.
The item must be exactly identical to the crafted version.
It must include:
The custom display name.
All enchantments.
The lore.
The same PersistentDataContainer data.
Any custom model data or metadata used by the plugin.
Both the crafting recipe and the command must use the same item creation method so there is only one valid version of The God Smasher.
If the player's inventory is full, safely drop the item at the player's feet instead of deleting it.
If executed from the console, display:
"This command can only be used by players."
Permission node:
thegodsmasher.admin
Default permission:
OP only.
If a player without permission executes the command, display:
"You do not have permission to use this command."
After successfully receiving the item, display:
"You have received The God Smasher!"
Add the following aliases:
/godsmasher
/gsm
Special Ability – Wind Boost

When a player is holding The God Smasher:

If the player is looking upward and holds right-click, they should continuously receive a powerful Wind Burst-style upward boost, allowing them to rapidly ascend into the sky.
The upward boost must continue only while the player keeps holding right-click.
As soon as the player releases right-click, the boost must immediately stop, allowing the player to fall naturally.
The player must receive complete fall damage immunity after using this ability.
Direction Restrictions

The boost should only activate when:

The player is on the ground and looking upward, or
The player is already airborne, even if they are looking downward.

If the player is on the ground and looks:

Down
Left
Right
Forward
Backward

then the ability must not activate.

Requirements
Compatible only with Paper 1.21.11.
The plugin must be highly optimized and free of bugs, exploits, duplication glitches, movement glitches, memory leaks, task leaks, or unintended behavior.
The boost should feel smooth and responsive without causing server lag or physics issues.
Ensure the custom item is properly identified using PersistentDataContainer so renamed or enchanted normal maces cannot trigger the ability.
Paper API Requirements

Generate code strictly using the official Paper 1.21.11 API.

Do NOT generate or reference any API elements that do not exist.

Specifically:

❌ Do NOT use Action.RELEASE_USE_ITEM
❌ Do NOT use Particle.WIND_CHARGE
❌ Do NOT use Sound.ENTITY_WIND_CHARGE_DEATH
❌ Do NOT use Material.UPGRADE_SMITHING_TEMPLATE
❌ Do NOT invent enum names, methods, particles, sounds, events, or Material constants.

If a requested particle or sound is unavailable in Paper 1.21.11, automatically replace it with the closest official Paper 1.21.11 equivalent.

Right-Click Detection

Paper 1.21.11 does not have a PlayerInteractEvent release action.

Do not attempt to detect releasing right-click using Action.RELEASE_USE_ITEM.

Instead, implement right-click hold detection using a fully supported Paper 1.21.11 method, such as:

A lightweight repeating task that safely checks whether the player is still actively using the item.
Another official Paper 1.21.11-compatible implementation.

The implementation must be efficient, multiplayer-safe, and must never get stuck boosting.

Final Verification

Before generating the plugin, verify that:

Every imported class exists.
Every method exists.
Every event exists.
Every enum constant exists.
Every Material exists.
Every Particle exists.
Every Sound exists.
The crafting recipe uses only valid Paper 1.21.11 Materials.
The plugin compiles successfully on Paper 1.21.11 with zero compilation errors, zero missing symbols, zero startup exceptions, and zero runtime errors. The generated code should be production-ready and should never fail to enable due to invalid API constants or Material names.
Kodari AI
KodariJul 17 at 9:55 am 8
TheGodSmasher
A Paper 1.21.11 plugin that introduces The God Smasher, a legendary enchanted mace obtainable through an exclusive nine-slot crafting recipe. The weapon carries Sharpness V, Density V, Wind Burst III, Looting III, Smite IV, and Breach IV, along with custom identification data and lore. Holding right-click while looking upward activates a continuous wind-powered ascent with fall-damage immunity. Administrators can grant the identical item through /creategodsmasher, /godsmasher, or /gsm.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 294
src/main/java/com/kodari/thegodsmasher/GodSmasherPlugin.java
package com.kodari.thegodsmasher;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.plugin.java.JavaPlugin;

public final class GodSmasherPlugin extends JavaPlugin {
    private GodSmasherItemFactory itemFactory;
    private WindBoostManager windBoostManager;

    @Override
    public void onEnable() {
        NamespacedKey itemKey = new NamespacedKey(this, "god_smasher");
        this.itemFactory = new GodSmasherItemFactory(itemKey);

        NamespacedKey recipeKey = new NamespacedKey(this, "god_smasher_recipe");
        ShapedRecipe recipe = new ShapedRecipe(recipeKey, this.itemFactory.create());
        recipe.shape("NSN", "MSW", "NUT");
        recipe.setIngredient('N', Material.NETHERITE_INGOT);
        recipe.setIngredient('S', Material.NETHERITE_SPEAR);
        recipe.setIngredient('M', Material.MACE);
        recipe.setIngredient('W', Material.NETHERITE_SWORD);
        recipe.setIngredient('T', Material.NETHER_STAR);
        recipe.setIngredient('U', Material.NETHERITE_UPGRADE_SMITHING_TEMPLATE);
        Bukkit.addRecipe(recipe);

        this.windBoostManager = new WindBoostManager(this, this.itemFactory);
        Bukkit.getPluginManager().registerEvents(this.windBoostManager, this);

        getCommand("creategodsmasher").setExecutor(new GodSmasherCommand(this.itemFactory));
    }

    @Override
    public void onDisable() {
        if (this.windBoostManager != null) {
            this.windBoostManager.shutdown();
        }
    }
}