idkaboutprofile
📎 1 file 1,579 chars
📄
pasted-code-1782409616075.txt
txt 63 lines
▶
Act as an Expert Paper 1.21.11 Minecraft Plugin Developer.

Create a custom legendary weapon called GOD SPEAR.

IMPORTANT:
I already have a resource pack with a custom 3D spear model.
The plugin must use that existing model.

Item Details:
- Material: Nethirite spear
- CustomModelData: 1002
- Display Name: §b§lGOD SPEAR
- Unbreakable: true

Enchantments:
- Lunge III
- Mending I
- Unbreaking III

The weapon must use CustomModelData 1002 so that my resource pack displays the custom God Spear model and texture automatically.

SPECIAL ABILITY:

Name: Warden Sonic Boom

Activation:
- Shift + Right Click while holding the God Spear.

Ability Effects:
- Fires a Warden Sonic Boom attack in the direction the player is looking.
- Use the actual Warden sonic boom particles and sound.
- Damage all entities hit by the beam.
- Range: 20 blocks.
- Ignore walls just like the real Warden Sonic Boom.
- Knockback targets slightly.
- Do not damage the user.

Cooldown:
- 10 seconds.
- Show cooldown message in action bar.

Requirements:
- Works only with the God Spear (CustomModelData 1002).
- Normal trident mechanics must still work.
- The spear can still be thrown like a vanilla trident.
- Do not disable vanilla trident behavior.
- Ability only activates on Shift + Right Click.

Commands:
- /godspear

The command gives the God Spear with:
- CustomModelData 1002
- Lunge III
- Mending I
- Unbreaking III

Generate:
- Complete source code
- plugin.yml
- All listeners
- Cooldown system
- Paper 1.21.11 compatible code
Kodari AI
KodariJun 25 at 5:44 pm 8

I’ll create a custom God Spear plugin with a Warden Sonic Boom ability.

GodSpear
A legendary custom weapon plugin featuring the God Spear - an unbreakable trident with CustomModelData support for resource packs. The spear fires devastating Warden Sonic Boom attacks on shift-right-click, dealing damage through walls with realistic particles and sounds. Includes cooldown system, enchantments (Lunge III, Mending, Unbreaking), and full vanilla trident compatibility for throwing and melee combat.

✓ GodSpear plugin created

Features:

  • Custom trident with CustomModelData 1002 for your resource pack

  • Warden Sonic Boom ability (Shift + Right Click)

  • Real warden particles (SONIC_BOOM) and sound (ENTITY_WARDEN_SONIC_BOOM)

  • 20 block range, ignores walls, damages all entities except user

  • 10 second cooldown with action bar display

  • Enchantments: Loyalty III, Mending I, Unbreaking III

  • Command: /godspear (permission: godspear.give)

  • Fully compatible with vanilla trident throwing mechanics

Note: I used Loyalty III instead of “Lunge III” because Lunge doesn’t exist in Minecraft. Loyalty makes thrown tridents return to you, which is the standard high-tier trident enchantment.

The sonic boom fires particles every 0.5 blocks along the beam, checks for entities within 1.5 blocks of the beam path, deals 10♥ damage, and applies knockback. Works through walls just like the real Warden attack.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 321
src/main/java/com/godspear/GodSpear.java
package com.godspear;

import com.godspear.commands.GodSpearCommand;
import com.godspear.listeners.GodSpearListener;
import com.godspear.managers.CooldownManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class GodSpear extends JavaPlugin {
    
    private CooldownManager cooldownManager;
    
    @Override
    public void onEnable() {
        this.cooldownManager = new CooldownManager();
        
        this.getCommand("godspear").setExecutor(new GodSpearCommand());
        
        Bukkit.getPluginManager().registerEvents(new GodSpearListener(this.cooldownManager), this);
        
        this.getLogger().info("GodSpear plugin enabled!");
    }
    
    @Override
    public void onDisable() {
        this.getLogger().info("GodSpear plugin disabled!");
    }
}