.evourai

make me a netherite sword with sharp 5 unbreaking 3 mending sweeping edge 3 fire aspect 2 and make it so every 10 hits theres a 10% chance the target gets hit by lightning

Kodari AI
KodariMay 6 at 1:50 pm 4,268 (v2)

I’ll create a plugin that gives a custom Netherite sword with powerful enchantments and a lightning strike ability.

LightningSword
A Minecraft plugin that provides a custom Netherite sword with maximum enchantments (Sharpness 5, Unbreaking 3, Mending, Sweeping Edge 3, Fire Aspect 2) and a unique lightning strike mechanic. Every 10 hits with the sword grants a 10% chance to strike the target with lightning. Includes a simple command to obtain the sword and automatic hit tracking per player.

Done! Created LightningSword plugin with:

  • /lightningsword command to obtain the sword

  • Netherite sword with Sharpness 5, Unbreaking 3, Mending, Sweeping Edge 3, Fire Aspect 2

  • Hit counter that tracks every 10 hits and rolls a 10% chance for lightning strike

  • Fully configurable messages, enchantments, and sword appearance

  • Uses XSeries for cross-version compatibility

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 230
src/main/java/com/example/lightningsword/LightningSword.java
package com.example.lightningsword;

import lombok.Getter;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@Getter
public class LightningSword extends JavaPlugin {
    
    private final Map<UUID, Integer> hitCounter = new HashMap<>();
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        getCommand("lightningsword").setExecutor(new SwordCommand(this));
        getServer().getPluginManager().registerEvents(new SwordListener(this), this);
        
        getLogger().info("LightningSword has been enabled!");
    }
    
    @Override
    public void onDisable() {
        hitCounter.clear();
        getLogger().info("LightningSword has been disabled!");
    }
    
    public String colorize(String message) {
        return ChatColor.translateAlternateColorCodes('&', message);
    }
}