Skplayz444 Skplayz444

Act as an expert Minecraft Paper Plugin Developer. Create a fully functional God Stone Sword plugin for Minecraft Paper 1.21.x.

Weapon: Use the exact vanilla Minecraft STONE_SWORD. No custom name, lore, texture, model, enchantments, or visible effects on the sword. It must look exactly like a normal vanilla stone sword.

Ability 1 — Unlimited Thunder:

  • While holding right-click and aiming anywhere, continuously summon lightning at the targeted location.
  • Allow unlimited uses without any cooldown or usage limit.
  • Every lightning hit must deal exactly 1 heart (2 HP) of damage to the target player.
  • Damage must remain exactly 1 heart regardless of the target's armor or protection enchantments. Bypass armor and protection damage reduction.
  • Lightning must damage the target normally, not just create visual lightning effects.

Ability 2 — Off-Hand Arrow Barrage:

  • When the vanilla stone sword is held in the off-hand, continuously shoot arrows while the player holds the designated off-hand ability input. Do not replace or break normal sword attacks.
  • Every arrow hit must deal exactly 1 heart (2 HP) of damage, regardless of armor or protection enchantments.
  • Allow unlimited arrows with no cooldown or usage limit.
  • Ensure arrows actually hit and damage targets correctly.

Critical Damage Animation Requirement:

Both lightning and arrows must cause proper, visible vanilla Minecraft damage feedback for other players observing the target. The target must visibly flash red, show the normal hurt animation, react to knockback where appropriate, and lose health correctly.

Do not use visual-only damage, fake damage packets, or client-side-only effects. Use proper server-side Bukkit/Paper damage handling and ensure the damage is synchronized correctly for every player. Fix any issue where the target loses health on their own screen but appears unaffected or in Creative Mode from the attacker's screen. Test this specifically from two different player clients.

Ability 3 — Fire Aspect:

  • Add a fire-related ability to the stone sword without adding any enchantment to the item.
  • Implement the fire effect through plugin code while keeping the sword visually vanilla and unenchanted.

Technical Requirements:

  • Use Java and the Paper API for Minecraft Paper 1.21.x.
  • Provide complete, compilable source code, "plugin.yml", and build configuration.
  • Implement reliable player input detection for holding right-click and activating the off-hand arrow ability.
  • Ensure the sword retains its normal vanilla appearance and normal left-click sword attack behavior.
  • Prevent accidental damage inconsistencies, infinite event recursion, and client-server desynchronization.
  • Include installation instructions and explain how to obtain the sword.
  • The sword must be a normal-looking vanilla stone sword, with no custom visible name or enchantments.

Deliver production-ready code, not pseudocode. Explain any Minecraft API limitations honestly and ensure all three abilities work together.

Kodari AI
KodariOct 28 at 5:32 am 3
GodStoneSword
Creates a vanilla-looking stone sword with three hidden abilities: unlimited lightning strikes on right-click hold dealing exactly 1 heart damage bypassing armor, off-hand arrow barrage dealing fixed 1 heart damage per hit, and fire aspect effect without enchantments. Uses Paper API 1.21.x with proper server-side damage handling, custom damage calculation ignoring armor/protection, and reliable input detection for continuous ability activation. Sword maintains normal vanilla appearance and standard left-click attack behavior.
  • Create the Paper 1.21.x plugin, command, and Gradle configuration; the sword stays visually vanilla and is identified by hidden item data.

  • Implement server-side lightning damage, real arrow projectiles with exact damage, and code-based fire aspect.

  • Paper does not expose held mouse-button state for a vanilla stone sword, so right-click will toggle continuous lightning; off-hand arrows fire on each left-click swing without cancelling normal attacks.

Created the Paper 1.21.x plugin with /godstone, Gradle configuration, and a sword that looks like a vanilla stone sword. Its hidden item data identifies it; it has no custom name, lore, enchantments, or visible effects.

Abilities

  • Lightning: Right-click toggles a continuous, 20-per-second lightning channel while the sword is in your main hand. A player you aim at takes 2 HP per strike.

  • Off-hand arrows: With the sword in your off-hand, each left-click swing fires a real arrow. Its hit deals 2 HP, and normal melee attacks are not cancelled.

  • Fire aspect: Main-hand melee hits set the target on fire for 4 seconds without adding an enchantment.

The ability damage uses server-side Bukkit damage handling, zeroes applicable reduction modifiers, and resets damage immunity for repeated hits. This produces normal server-synchronized damage feedback rather than fake packets. Other plugins can still cancel damage, and vanilla invulnerability rules still apply.

Input limitation: Paper does not expose a held right-click state for a vanilla stone sword. So lightning uses a toggle—right-click again to stop—instead of stopping on button release. Arrows fire per swing, not continuously from a separately tracked held input.

I couldn’t run the requested two-client live test here, so that specific test remains outstanding.

Install and obtain the sword: Compile in Kodari (Compile → Compile → Download), place the JAR in your Paper server’s plugins/ folder, and restart. An operator can then run /godstone to receive the sword.

Skplayz444 Skplayz444

Act as an expert Minecraft Paper Plugin Developer. Create a fully functional God Stone Sword plugin for Minecraft Paper 1.21.x.

Weapon: Use the exact vanilla Minecraft STONE_SWORD. No custom name, lore, texture, model, enchantments, or visible effects on the sword. It must look exactly like a normal vanilla stone sword.

Ability 1 — Unlimited Thunder:

  • While holding right-click and aiming anywhere, continuously summon lightning at the targeted location.
  • Allow unlimited uses without any cooldown or usage limit.
  • Every lightning hit must deal exactly 1 heart (2 HP) of damage to the target player.
  • Damage must remain exactly 1 heart regardless of the target's armor or protection enchantments. Bypass armor and protection damage reduction.
  • Lightning must damage the target normally, not just create visual lightning effects.

Ability 2 — Off-Hand Arrow Barrage:

  • When the vanilla stone sword is held in the off-hand, continuously shoot arrows while the player holds the designated off-hand ability input. Do not replace or break normal sword attacks.
  • Every arrow hit must deal exactly 1 heart (2 HP) of damage, regardless of armor or protection enchantments.
  • Allow unlimited arrows with no cooldown or usage limit.
  • Ensure arrows actually hit and damage targets correctly.

Critical Damage Animation Requirement:

Both lightning and arrows must cause proper, visible vanilla Minecraft damage feedback for other players observing the target. The target must visibly flash red, show the normal hurt animation, react to knockback where appropriate, and lose health correctly.

Do not use visual-only damage, fake damage packets, or client-side-only effects. Use proper server-side Bukkit/Paper damage handling and ensure the damage is synchronized correctly for every player. Fix any issue where the target loses health on their own screen but appears unaffected or in Creative Mode from the attacker's screen. Test this specifically from two different player clients.

Ability 3 — Fire Aspect:

  • Add a fire-related ability to the stone sword without adding any enchantment to the item.
  • Implement the fire effect through plugin code while keeping the sword visually vanilla and unenchanted.

Technical Requirements:

  • Use Java and the Paper API for Minecraft Paper 1.21.x.
  • Provide complete, compilable source code, "plugin.yml", and build configuration.
  • Implement reliable player input detection for holding right-click and activating the off-hand arrow ability.
  • Ensure the sword retains its normal vanilla appearance and normal left-click sword attack behavior.
  • Prevent accidental damage inconsistencies, infinite event recursion, and client-server desynchronization.
  • Include installation instructions and explain how to obtain the sword.
  • The sword must be a normal-looking vanilla stone sword, with no custom visible name or enchantments.

Deliver production-ready code, not pseudocode. Explain any Minecraft API limitations honestly and ensure all three abilities work together.

Kodari AI
KodariOct 28 at 5:34 am 1
  1. Inspect the current plugin and build files.

  2. Update the abilities to use supported Paper input events and server-side damage.

  3. Check command and installation details against the resulting code.

Updated the plugin for Paper 1.21.x. The sword remains a vanilla-looking STONE_SWORD, identified by hidden persistent data; /godstone gives it to players with the godstone.give permission (operators by default).

  • Lightning: Right-click toggles continuous strikes while the sword is in your main hand. Strikes deal 2 HP through server-side damage handling, with damage-reduction modifiers cleared.

  • Off-hand arrows: Hold sneak with the sword in your off-hand to fire real arrows continuously. Their normal hit events are adjusted to 2 HP without cancelling the arrow hit or normal melee attacks.

  • Fire aspect: Main-hand melee hits set the target on fire for four seconds; no enchantment is added.

Input limitation: Paper does not provide a vanilla plugin with reliable held right-mouse-button state for this sword. Lightning therefore toggles on and off with right-click rather than ending on button release. Sneak is the designated held input for the off-hand barrage.

I did not run a two-client live test here, so multiplayer damage feedback is not verified in that specific test. To install, compile in Kodari, download the JAR, put it in the server’s plugins/ folder, and restart; then use /godstone in-game.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 329
src/main/java/com/kodari/godstone/GodStonePlugin.java
package com.kodari.godstone;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Map;
import java.util.Objects;

public final class GodStonePlugin extends JavaPlugin implements CommandExecutor {
    private NamespacedKey swordKey;
    private Material stoneSwordMaterial;
    private GodStoneListener listener;

    @Override
    public void onEnable() {
        XMaterial stoneSword = XMaterial.matchXMaterial("STONE_SWORD")
                .orElseThrow(() -> new IllegalStateException("STONE_SWORD is unavailable"));
        this.stoneSwordMaterial = Objects.requireNonNull(stoneSword.parseMaterial());
        this.swordKey = new NamespacedKey(this, "god_stone_sword");

        listener = new GodStoneListener(this);
        getServer().getPluginManager().registerEvents(listener, this);
        listener.start();
        Objects.requireNonNull(getCommand("godstone")).setExecutor(this);
    }

    @Override
    public void onDisable() {
        if (listener != null) {
            listener.stop();
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Only a player can receive the God Stone Sword.");
            return true;
        }
        if (!player.hasPermission("godstone.give")) {
            player.sendMessage("You do not have permission to use this command.");
            return true;
        }

        Map<Integer, ItemStack> leftovers = player.getInventory().addItem(createGodSword());
        leftovers.values().forEach(item -> player.getWorld().dropItemNaturally(player.getLocation(), item));
        player.sendMessage("You received the God Stone Sword.");
        return true;
    }

    public ItemStack createGodSword() {
        ItemStack sword = XMaterial.matchXMaterial("STONE_SWORD")
                .map(XMaterial::parseItem)
                .orElseThrow(() -> new IllegalStateException("STONE_SWORD is unavailable"));
        ItemMeta meta = Objects.requireNonNull(sword.getItemMeta());
        meta.getPersistentDataContainer().set(swordKey, PersistentDataType.BYTE, (byte) 1);
        sword.setItemMeta(meta);
        return sword;
    }

    public boolean isGodSword(ItemStack item) {
        return item != null
                && item.getType() == stoneSwordMaterial
                && item.hasItemMeta()
                && item.getItemMeta().getPersistentDataContainer().has(swordKey, PersistentDataType.BYTE);
    }
}