sevenpoted

Can you give me a command in game that i can use so when i type it when i hold a sword it adds an ability that takes there chestplate off and leggings off for 2 seconds and then comes back

Kodari AI
KodariJul 2 at 5:34 pm 1
ArmorStripper
A simple Minecraft plugin that adds a command allowing players holding a sword to temporarily strip a target's chestplate and leggings for 2 seconds before automatically re-equipping them. Perfect for PvP engagements, mini-games, or combat mechanics. Lightweight with no external dependencies.

I’ll create this plugin now. Structure:

  • plugin.yml — registers the command

  • ArmorStripper.java — main plugin class

  • StripCommand.java — command logic


In-game usage: /striparmor <player> (also works as /strip <player> or /disarm <player>)

How it works:

  1. Hold a sword in your main hand

  2. Type /striparmor <target>

  3. The target’s chestplate + leggings are removed and stored

  4. After exactly 2 seconds, they’re automatically re-equipped

  5. If the armor slots got filled in those 2 seconds, the items drop at their feet instead

sevenpoted

Can you make it so when you hit the person with the sword that has the ability on it the ability works instead

Kodari AI
KodariJul 2 at 5:38 pm 3

Switch from command-target to hit-trigger: /striparmor now applies the ability to the sword you’re holding. Hitting a player with that sword strips their armor for 2 seconds


Usage:

  • /striparmor — applies the Armor Stripper ability to the sword you’re holding (must hold a sword)

  • Hit any player with that sword — their chestplate and leggings are stripped for 2 seconds, then returned automatically

The ability is tracked via lore (§6Armor Stripper) so swords can’t be double-applied.

Kodari can make mistakes. Review important code before using.
Files
src
Code
4 150
src/main/java/com/kodari/armorstripper/ArmorStripper.java
package com.kodari.armorstripper;

import org.bukkit.plugin.java.JavaPlugin;

public class ArmorStripper extends JavaPlugin {

    @Override
    public void onEnable() {
        getCommand("striparmor").setExecutor(new StripCommand());
        getServer().getPluginManager().registerEvents(new CombatListener(this), this);
        getLogger().info("ArmorStripper enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("ArmorStripper disabled.");
    }
}