aackerboy01

Create a Minecraft PaperMC plugin in Java for Minecraft 1.21.1+.

Plugin Name: OPSword

Main Class: me.smarterboy.opsword.OPSwordPlugin

Features:

Add a command /giveopsword When a player runs the command, they receive a custom diamond sword.

Sword details:

Name: §cOP Sword Enchantment: Sharpness level 20 CustomModelData: 1001 Unbreakable: true

Abilities:

⚡ Lightning Ability

When the player right-clicks, lightning strikes the block the player is looking at (max distance 40 blocks).

🔥 Fire Ability

When the player left-clicks, shoot a small fireball in the direction the player is looking and spawn small lava tsunami

💧 Water Ability

When the player use specified key create a water wave effect that pushes nearby entities 50 blocks away and extinguishes fire and bring water small water tsunami

Gameplay rules:

Each ability must have a 5 second cooldown Send a message if the ability is on cooldown

add tow more most powerful ability and each abilty have its key and key will work only when sword in in hand

give the sword resource pack to give that OP Sword a custom sword png (png is given)

when player click the specified key then use the ability when player use sword normally then give it sharpness 20 damage without cooldown give it a description of GOD'S GIFT

1 image attached
Kodari AI
KodariMar 26 at 4:43 pm 14,353 (v2)

I’ll create a powerful OP Sword plugin with 5 unique abilities, custom key bindings, resource pack support, and proper cooldown management.

OPSword
A powerful custom weapon plugin featuring an OP Diamond Sword with five devastating abilities. Includes Lightning Strike, Fire Blast with lava tsunami, Water Wave with knockback, Explosive Devastation, and Teleport Strike. Each ability is bound to specific keys and has cooldown management. Features custom model data support for resource pack integration and unbreakable enchanted sword mechanics.

Now I’ll create a basic placeholder for the texture file location:

The OP Sword plugin is complete! Here’s what I’ve created:

Features Implemented:

5 Powerful Abilities:

  1. ⚡ Lightning Strike (Right-Click) - Strike lightning at target block (40 blocks)

  2. 🔥 Fire Blast (Left-Click Block) - Fireball projectile + lava tsunami trail

  3. 💧 Water Wave (Shift+Right-Click) - Push entities 50 blocks + water tsunami + extinguish fires

  4. 💥 Explosive Devastation (Drop Key Q) - Massive explosion at target with knockback

  5. ⚡ Teleport Strike (Swap Hands F) - Teleport to target + shockwave knockback

Key Features:

  • Each ability has 5-second cooldown (per ability, not global)

  • Keys only work when OP Sword is in hand

  • Normal attacks deal Sharpness 20 damage without cooldown

  • Custom lore: “GOD’S GIFT” + ability descriptions

  • Unbreakable with CustomModelData 1001

  • Full configuration in config.yml

Resource Pack:

  • Ready for your custom texture

  • Place your sword PNG at: src/main/resources/assets/minecraft/textures/item/opsword.png

  • Follow instructions in README-RESOURCEPACK.md to package and distribute

Commands:

  • /giveopsword [player] - Give the OP Sword

  • Permission: opsword.give

All abilities include particle effects, sounds, and custom messages!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README-RESOURCEPACK.md
Code
13 751
src/main/java/me/smarterboy/opsword/OPSwordPlugin.java
package me.smarterboy.opsword;

import lombok.Getter;
import me.smarterboy.opsword.commands.GiveOPSwordCommand;
import me.smarterboy.opsword.listeners.AbilityListener;
import me.smarterboy.opsword.managers.CooldownManager;
import me.smarterboy.opsword.managers.SwordManager;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class OPSwordPlugin extends JavaPlugin {
    
    private SwordManager swordManager;
    private CooldownManager cooldownManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.swordManager = new SwordManager(this);
        this.cooldownManager = new CooldownManager(this);
        
        getCommand("giveopsword").setExecutor(new GiveOPSwordCommand(this));
        
        getServer().getPluginManager().registerEvents(new AbilityListener(this), this);
        
        getLogger().info("OPSword plugin has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("OPSword plugin has been disabled!");
    }
}