vivekisdying

Create a Minecraft Paper 1.21.1 plugin called SevenSwords.

Add a Legendary Ice Sword.

Item:

Material: Netherite Sword Display Name: Ice Sword Unbreakable Can only be obtained through admin command.

Command: /givesword ice <player>

Damage:

Ice Sword deals 10 damage on hit.

Abilities:

Frost Strike

On hit, apply Slowness for 6 seconds.

Reduce movement speed by approximately 80%.

The target must still be able to move.

Frozen Legs

On hit, prevent the target from jumping for 6 seconds.

Frostbite

Apply a freezing effect similar to Powder Snow.

Duration: 6 seconds.

Deal 1 heart of extra freeze damage during the effect.

Snow Biome Passive

While holding the Ice Sword in a snowy biome:

Give Speed I.

Ice Walker

While holding the Ice Sword:

Move faster on Ice, Packed Ice, and Blue Ice.

Fire Counter

If a target is burning from the Fire Sword and is hit by the Ice Sword:

Reduce burn duration from 5 seconds to 3 seconds.

Balancing:

Add cooldown protection so effects do not stack excessively.

Effects should refresh duration instead of stacking infinitely.

Requirements:

Paper 1.21.1 compatible.

Use Paper API.

Include plugin.yml.

Include all source files.

Generate a downloadable JAR file.

Build successfully without errors.

Kodari AI
KodariJun 25 at 7:59 am 18
SevenSwords
A Minecraft Paper 1.21.1 plugin featuring legendary themed swords. Currently includes the Ice Sword, a Netherite Sword unobtainable through survival, with six abilities: Frost Strike (Slowness on hit), Frozen Legs (disables jumping), Frostbite (freeze effect + bonus damage), Snow Biome Passive (Speed I), Ice Walker (Speed boost on ice blocks), and Fire Counter (reduces burn duration). Granted to players via admin command with cooldown-protected, refresh-based effects.

Plan:

  1. IceSword.java — item factory + PDC identification

  2. IceSwordListener.java — all ability logic, passive scheduler, jump prevention

  3. GiveSwordCommand.java — /givesword ice <player> with tab completion

  4. SevenSwords.java — main class wiring everything together

  5. plugin.yml + build.gradle


What was built:

File
Purpose
SevenSwords.java
Main plugin — wires up items, listener, command
items/IceSword.java
Netherite Sword factory with PDC tag for reliable identification
listeners/IceSwordListener.java
All 6 abilities + passive scheduler
commands/GiveSwordCommand.java
/givesword ice <player>
with tab-complete
plugin.yml
Command + permission declarations
build.gradle
Paper 1.21.1 build config

Ability breakdown:

  • Frost Strike — SLOWNESS V (120 ticks) on every hit; re-hitting refreshes duration instead of stacking

  • Frozen Legs — cancels upward Y movement in PlayerMoveEvent for 6 seconds (player targets)

  • Frostbite — sets freezeTicks(140) for the full powder-snow visual, schedules 2 HP bonus damage at 2 s, clears at 6 s; 3-second cooldown per target

  • Snow Biome Passive — scheduler every 10 ticks applies Speed I for 30 ticks while holding the sword in a snowy biome (self-refreshing)

  • Ice Walker — same scheduler applies Speed II while standing on Ice / Packed Ice / Blue Ice

  • Fire Counter — if target’s fire ticks exceed 60 (3 s), caps them to 60 on hit

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 392
src/main/java/com/sevenswords/SevenSwords.java
package com.sevenswords;

import com.sevenswords.commands.GiveSwordCommand;
import com.sevenswords.items.IceSword;
import com.sevenswords.listeners.IceSwordListener;
import org.bukkit.plugin.java.JavaPlugin;

public class SevenSwords extends JavaPlugin {

    private static SevenSwords instance;
    private IceSword iceSword;

    @Override
    public void onEnable() {
        instance = this;

        iceSword = new IceSword(this);

        IceSwordListener iceSwordListener = new IceSwordListener(this, iceSword);
        getServer().getPluginManager().registerEvents(iceSwordListener, this);
        iceSwordListener.startPassiveTask();

        GiveSwordCommand giveSwordCommand = new GiveSwordCommand(iceSword);
        getCommand("givesword").setExecutor(giveSwordCommand);
        getCommand("givesword").setTabCompleter(giveSwordCommand);

        getLogger().info("SevenSwords enabled — Ice Sword ready.");
    }

    @Override
    public void onDisable() {
        instance = null;
        getLogger().info("SevenSwords disabled.");
    }

    public static SevenSwords getInstance() {
        return instance;
    }

    public IceSword getIceSword() {
        return iceSword;
    }
}