12345bartek

Generate a plugin for a special sword that, upon striking an opponent, grants them a levitation effect for 30 seconds. This item should also have a 20-second cooldown and be indestructible. The config should include: a space for changing the cooldown, a space for the item's name and lore, a space for changing the item type, a space for changing the effect (from levitation to another), and a reload command. this sword have enchant knockback 3.

Kodari AI
KodariApr 19 at 6:08 pm 8,309 (v2)

I’ll create a special sword plugin with configurable levitation effects, cooldowns, and customization options.

LevitationSword
A plugin that adds a customizable special sword which applies levitation or other potion effects to struck enemies. Features configurable cooldown system, fully customizable item properties including material, name, lore, and enchantments. The sword is indestructible and includes admin commands for reloading configuration and giving the sword to players. Perfect for PvP servers wanting unique combat mechanics with floating enemies.

Created a complete LevitationSword plugin with all requested features: configurable special sword that applies levitation (or any other effect) to struck enemies, 20-second cooldown system, indestructible item with Knockback III enchantment, fully customizable via config.yml, and includes /levsword reload and /levsword give commands.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 406
src/main/java/com/example/levitationsword/LevitationSword.java
package com.example.levitationsword;

import com.example.levitationsword.command.SwordCommand;
import com.example.levitationsword.listener.SwordListener;
import com.example.levitationsword.manager.ConfigManager;
import com.example.levitationsword.manager.ItemManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class LevitationSword extends JavaPlugin {

    private ConfigManager configManager;
    private ItemManager itemManager;
    private SwordListener swordListener;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.itemManager = new ItemManager(this);
        this.swordListener = new SwordListener(this);
        
        getServer().getPluginManager().registerEvents(swordListener, this);
        getCommand("levsword").setExecutor(new SwordCommand(this));
        
        getLogger().info("LevitationSword has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("LevitationSword has been disabled!");
    }
}