vrij01_

For Version latest 26.2 Create a custom Minecraft server plugin called CustomSword.

Kodari AI
KodariSep 16 at 4:06 pm 1

The generation was stopped before any content could be produced.

vrij01_

For Version latest 26.2 Create a custom Minecraft server plugin called CustomSword. When any player joins the server for the first time, they automatically receive a Wooden Sword.

The sword can be upgraded by killing other players.

Each player starts with a Wooden Sword and progresses through different sword tiers by getting kills.

The upgrade progression should be:

Wooden → Stone → Iron → Golden → Diamond → Netherite When a player reaches the required number of kills, their sword automatically upgrades to the next tier.

Kodari AI
KodariSep 16 at 4:08 pm 1
CustomSword
CustomSword is a Minecraft server plugin that automatically grants new players a Wooden Sword on their first join. Players progress through sword tiers (Wooden, Stone, Iron, Golden, Diamond, Netherite) by earning player kills. Each kill increments a counter, and upon reaching the required threshold, the player's sword automatically upgrades to the next tier. The plugin tracks kills per player, manages sword upgrades in hand and inventory, and displays tier progression feedback. It supports configurable kill requirements per tier and persists player data across sessions.
  1. Create the Gradle Paper plugin project and metadata for CustomSword.

  2. Implement persistent kill tracking, first-join sword assignment, PvP kill handling, and automatic tier upgrades.

  3. Add configurable tier thresholds, materials, names, and player messages.

Created the CustomSword Paper plugin project.

  • First-time players receive a custom Wooden Sword.

  • PvP kills are persisted in data.yml.

  • Sword progression:

    • Wooden: 0 kills

    • Stone: 5 kills

    • Iron: 10 kills

    • Golden: 15 kills

    • Diamond: 25 kills

    • Netherite: 40 kills

  • Swords automatically upgrade after reaching each kill requirement.

  • Tier materials, names, kill thresholds, and messages are configurable in config.yml.

  • Includes Gradle build files and plugin.yml.

vrij01_

Make for Version 26.2 and per kill upgrade tier

Kodari AI
KodariSep 16 at 4:09 pm 1
  1. Update the plugin target to the latest 26.2 server API.

  2. Change progression so every player kill advances the sword exactly one tier, through Netherite.

  3. Remove threshold-based configuration and keep persistence, first-join assignment, and

[Generation stopped]

vrij01_

And make sure any player can't make swords like diamond and stick to diamond any type of sword any type of player can't make them by material only upgrade the tier to kill and per kill sword will be upgraded

Kodari AI
KodariSep 16 at 4:13 pm 1
  1. Change tier thresholds to one kill per upgrade: Wooden 0, Stone 1, Iron 2, Golden 3, Diamond 4, Netherite 5.

  2. Block crafting of every vanilla sword recipe, so sword materials cannot be used to bypass progression.

  3. Keep the plugin-created tagged sword as the only progression sword and preserve automatic upgrades on player kills.

Updated CustomSword:

  • Sword upgrades now happen once per player kill:

    • 0 kills: Wooden

    • 1 kill: Stone

    • 2 kills: Iron

    • 3 kills: Golden

    • 4 kills: Diamond

    • 5 kills: Netherite

  • Removed configurable kill thresholds so progression cannot be bypassed.

  • Blocked crafting of every sword material.

  • Blocked smithing Diamond Swords into Netherite Swords.

  • Players can only obtain higher-tier swords through kills.

  • Added a configurable message explaining that swords can only be upgraded through player kills.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 397
src/main/java/com/example/customsword/CustomSwordPlugin.java
package com.example.customsword;

import org.bukkit.plugin.java.JavaPlugin;

public final class CustomSwordPlugin extends JavaPlugin {

    private SwordManager swordManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        swordManager = new SwordManager(this);
        getServer().getPluginManager().registerEvents(swordManager, this);
    }

    @Override
    public void onDisable() {
        if (swordManager != null) {
            swordManager.saveData();
        }
    }
}