aadmiplays

Make this plugin for version 1.21.11 for papermc

📎 1 file 3,458 chars
📄
pasted-code-1784825175498.txt
txt 214 lines
▶
Create a COMPLETE production-ready Minecraft PaperMC plugin.

Requirements:

Paper Version:

* PaperMC 1.21.11

Java:

* Java 21

Build System:

* Maven

Plugin Name:

* GodArmor

IMPORTANT:

* Generate ALL source files.
* Generate pom.xml.
* Generate plugin.yml.
* Generate folder structure.
* Generate code that COMPILES without modification.
* Do NOT use placeholders.
* Do NOT generate pseudocode.
* Do NOT use reflection.
* Do NOT use preview Java features.
* Do NOT create private nested classes that are instantiated externally.
* Ensure every constructor used by lambdas, schedulers, maps, and listeners is accessible.
* Verify all classes compile together.
* Use only PaperMC API.
* Do not depend on external libraries.

COMMAND

/godarmor

Permission:
godarmor.give

The command gives a complete custom God Armor set.

ARMOR IDENTIFICATION

Use PersistentDataContainer.

Items must continue working after:

* server restart
* player relog
* inventory movement
* death and respawn

Only plugin-created armor should grant powers.

HELMET

Name:
§6God Helmet

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Respiration III
* Aqua Affinity I

Effects:

* Fire Resistance
* Resistance II
* Saturation

Equip Message:
§6⚡ God Helmet Equipped! Fire cannot stop you.

CHESTPLATE

Name:
§6God Chestplate

Enchantments:

* Protection V
* Unbreaking III
* Mending I

Effects:

* Strength III
* +10 Hearts

Equip Message:
§6⚡ God Chestplate Equipped! Divine strength flows through you.

LEGGINGS

Name:
§6God Leggings

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Swift Sneak III

Effects:

* Speed III
* No Fall Damage

Equip Message:
§6⚡ God Leggings Equipped! You move with godlike speed.

BOOTS

Name:
§6God Boots

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Feather Falling IV
* Depth Strider III
* Soul Speed III

Effects:

* Dolphin's Grace
* Double Jump

DOUBLE JUMP

Requirements:

* Only while wearing God Boots.
* Double jump activates in air.
* Strong upward boost.
* Small forward boost.
* Play particles.
* Play sound.
* Reset when player lands.
* Must not interfere with Elytra.
* Must not allow infinite flight.

FULL SET BONUS

When all 4 pieces are equipped:

Grant:

* Regeneration II
* Water Breathing
* Night Vision

Message:
§6⚡ DIVINE POWER ACTIVATED! ⚡

When full set is broken:

Remove bonus effects.

Message:
§c⚡ DIVINE POWER LOST! ⚡

MESSAGES

Equip messages must:

* Show once when equipped.
* Never spam every tick.
* Show again only after removal and re-equip.

TECHNICAL REQUIREMENTS

Create these classes:

* GodArmorPlugin
* GodArmorCommand
* GodArmorManager
* ArmorFactory
* ArmorListener
* DoubleJumpListener
* FallDamageListener

Requirements:

* No IllegalAccessError.
* No NullPointerException.
* No deprecated APIs.
* No external dependencies.
* No runtime-generated classes.
* No private constructors used by maps or lambdas.
* Must compile cleanly with Maven.
* Must load on PaperMC 1.21.11.

Before outputting code, internally verify:

1. Every class exists.
2. Every import exists.
3. Every constructor is accessible.
4. plugin.yml matches the command registration.
5. The project builds successfully with mvn clean package.

Output every file completely.
Kodari AI
KodariJul 23 at 4:49 pm 20
GodArmor
GodArmor provides an admin-controlled custom armor set for Paper servers. The /godarmor command grants persistent, tagged Netherite armor that retains its powers across restarts, relogs, inventory moves, deaths, and respawns. Each piece grants distinct effects, including enhanced health, fall-damage immunity, and a controlled double jump. Equipping the complete set activates additional divine effects with one-time equip and full-set status messages.
aadmiplays

modify the plugin according to this given command

📎 1 file 2,262 chars
📄
pasted-code-1784826135258.txt
txt 137 lines
▶
ADDITIONAL REQUIREMENTS

ITEM NAMES

All God Armor item names must be:

* Bold
* Gold/Yellow colored

Use:

§6§lGod Helmet
§6§lGod Chestplate
§6§lGod Leggings
§6§lGod Boots

COMMANDS

Main command:

/godarmor

Additional commands:

/godhelmet
/godchestplate
/godleggings
/godboots

Permissions:

godarmor.give
godarmor.helmet
godarmor.chestplate
godarmor.leggings
godarmor.boots

INVENTORY HANDLING

When using /godarmor:

1. Check available inventory slots.

2. If inventory contains empty slots:

   * Put armor pieces into available slots.

3. If inventory becomes full:

   * Drop remaining God Armor pieces naturally at the player's location.

4. Never delete items.

5. Never overwrite existing inventory items.

6. Never replace armor currently being worn.

7. Never replace hotbar items.

8. Never clear inventory space automatically.

9. Always preserve every existing player item.

Examples:

Case 1:
Player has 4 empty slots.
Result:
All 4 armor pieces go into inventory.

Case 2:
Player has 2 empty slots.
Result:
2 armor pieces enter inventory.
2 armor pieces drop on ground.

Case 3:
Player inventory completely full.
Result:
All 4 armor pieces drop naturally on the ground.

INDIVIDUAL COMMANDS

/godhelmet

Give only:
§6§lGod Helmet

/godchestplate

Give only:
§6§lGod Chestplate

/ godleggings

Give only:
§6§lGod Leggings

/ godboots

Give only:
§6§lGod Boots

Use the same inventory rules:

* Put item into inventory if space exists.
* Drop item naturally if inventory is full.
* Never overwrite existing items.

DEATH BEHAVIOR

When a player dies:

* All God Armor pieces must drop naturally.
* God Armor must never disappear.
* God Armor must never be removed by the plugin.
* God Armor must keep all enchantments and abilities after pickup.

CHAT MESSAGES

Use gold/yellow themed messages.

Examples:

§6§l⚡ God Helmet Equipped! Fire cannot stop you.
§6§l⚡ God Chestplate Equipped! Divine strength flows through you.
§6§l⚡ God Leggings Equipped! You move with godlike speed.
§6§l⚡ God Boots Equipped! The skies are yours.

Full Set:

§6§l⚡ DIVINE POWER ACTIVATED! ⚡

Removed:

§c§l⚡ DIVINE POWER LOST! ⚡
Kodari AI
KodariJul 23 at 5:03 pm 16
  1. Update armor naming and all gold bold player messages.

  2. Add the four individual grant commands and permissions.

  3. Change item delivery to preserve inventory, dropping only overflow items naturally.

  4. Preserve tagged armor through death while retaining all existing powers.

  1. Completed the command, name, delivery, and death-behavior changes.

  2. Checking the modified listener imports and slot handling for Paper API compatibility.1. Added /godhelmet, /godchestplate, /godleggings, and /godboots with their individual permissions.

  3. God Armor names and equip/full-set messages now use bold gold styling.

  4. All grant commands use safe inventory insertion and naturally drop only overflow items—without replacing equipped, hotbar, or existing inventory items.

  5. Added keep-inventory death handling so tagged God Armor still drops naturally rather than being retained.

  6. Kept the Maven/Paper 1.21.11 Java 21 project setup; no Gradle files were created.

aadmiplays
📎 1 file 4,853 chars
📄
pasted-code-1784826742100.txt
txt 261 lines
▶
ARMOR EFFECT SYSTEM

This plugin must implement a REAL wearable armor ability system.

The armor effects are NOT permanent.

Effects must ONLY be active while the corresponding God Armor piece is currently equipped.

When a player equips a God Armor piece:

* Apply its effects immediately.
* Send its equip message once.
* Mark that piece as equipped.

When a player removes a God Armor piece:

* Remove all effects granted by that piece immediately.
* Remove all custom attributes granted by that piece immediately.
* Reset the equipped state.
* Do not leave any residual effects.

The plugin must correctly detect:

* Inventory click equip
* Shift-click equip
* Shift-click unequip
* Hotbar swap
* Number key swap
* Right-click equip
* Drag equip
* Dispenser equip
* Join server
* Respawn
* Death
* World change

Do not rely solely on a repeating task.

Use proper PaperMC event listeners and only use a lightweight verification task if necessary.

==================================================
§6§lGOD HELMET
==============

Item Name:
§6§lGod Helmet

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Respiration III
* Aqua Affinity I

Effects while worn:

* Fire Resistance
* Resistance II
* Saturation

Equip Message:
§6§l⚡ God Helmet Equipped! Fire cannot stop you.

When removed:

* Remove Fire Resistance
* Remove Resistance II
* Remove Saturation

==================================================
§6§lGOD CHESTPLATE
==================

Item Name:
§6§lGod Chestplate

Enchantments:

* Protection V
* Unbreaking III
* Mending I

Effects while worn:

* Strength III
* +10 Hearts

Implementation:

* Use Attribute.GENERIC_MAX_HEALTH
* Increase max health from 20 to 40

Equip Message:
§6§l⚡ God Chestplate Equipped! Divine strength flows through you.

When removed:

* Remove Strength III
* Restore max health to vanilla value

==================================================
§6§lGOD LEGGINGS
================

Item Name:
§6§lGod Leggings

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Swift Sneak III

Effects while worn:

* Speed III
* Complete Fall Damage Immunity

Equip Message:
§6§l⚡ God Leggings Equipped! You move with godlike speed.

When removed:

* Remove Speed III
* Restore normal fall damage

Fall Damage Rules:

* Only cancel fall damage when God Leggings are worn.
* Fall damage must work normally after leggings are removed.

==================================================
§6§lGOD BOOTS
=============

Item Name:
§6§lGod Boots

Enchantments:

* Protection V
* Unbreaking III
* Mending I
* Feather Falling IV
* Depth Strider III
* Soul Speed III

Effects while worn:

* Dolphin's Grace
* Double Jump

Equip Message:
§6§l⚡ God Boots Equipped! The skies are yours.

When removed:

* Remove Dolphin's Grace
* Disable Double Jump immediately

DOUBLE JUMP SYSTEM

Double Jump must only work while God Boots are worn.

Requirements:

* Player must be airborne.
* Detect flight toggle event.
* Launch player upward.
* Give slight forward momentum.
* Play particle effects.
* Play sound effects.
* Reset jump when player lands.
* No infinite flight.
* No bypasses.

Must NOT interfere with:

* Elytra
* Creative Mode
* Spectator Mode

When boots are removed:

* Double Jump must instantly stop working.

==================================================
FULL SET BONUS
==============

Full Set Requirement:

Player must wear:

* §6§lGod Helmet
* §6§lGod Chestplate
* §6§lGod Leggings
* §6§lGod Boots

Only while ALL FOUR pieces are equipped:

Grant:

* Regeneration II
* Water Breathing
* Night Vision

Activation Message:
§6§l⚡ DIVINE POWER ACTIVATED! ⚡

When any piece is removed:

Remove:

* Regeneration II
* Water Breathing
* Night Vision

Message:
§c§l⚡ DIVINE POWER LOST! ⚡

Messages must only appear once per state change.

Do not spam messages every tick.

==================================================
DEATH BEHAVIOR
==============

When a player dies wearing God Armor:

* All God Armor pieces must drop naturally.
* Do not delete armor.
* Do not clear armor.
* Do not prevent drops.
* Preserve all enchantments.
* Preserve all PersistentDataContainer data.
* Armor must continue functioning when picked up again.

==================================================
QUALITY REQUIREMENTS
====================

The plugin must create a real wearable ability system.

The armor itself grants powers only while worn.

Removing armor must instantly remove powers.

No permanent effects.

No command-based effect granting.

No placeholder code.

No pseudocode.

Generate complete production-ready PaperMC 1.21.11 Java 21 code.
Kodari AI
KodariJul 23 at 5:19 pm 40
  1. Replace passive/persistent effects with immediate equipment-state reconciliation.

  2. Cover armor swaps, joins, respawns, death, world changes, and dispenser equip through Paper listeners.

  3. Remove only plugin-owned effects and the God chestplate health modifier when the source armor is no longer worn.

  4. Keep double jump and fall immunity strictly dependent on their tagged armor pieces.

Implemented the wearable God Armor ability system.

  • Added Paper armor-change reconciliation with inventory, drag, right-click, dispenser, join, respawn, death, and world-change coverage.

  • Effects, health modifier, fall immunity, and double jump now apply only while their tagged armor piece is worn and are removed on unequip.

  • Full-set effects and messages transition once per equipped/full-set state change.

  • Double jump remains limited to airborne Survival/Adventure players wearing God Boots, without disrupting Elytra, Creative, or Spectator flight.

  • God Armor still drops naturally on death, including servers using keep-inventory.

  • Maven remains the only build system; no build.gradle files were created.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
9 870
src/main/java/com/kodari/godarmor/GodArmorPlugin.java
package com.kodari.godarmor;

import java.util.Objects;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class GodArmorPlugin extends JavaPlugin {

    private GodArmorManager godArmorManager;
    private DoubleJumpListener doubleJumpListener;

    @Override
    public void onEnable() {
        ArmorFactory armorFactory = new ArmorFactory(this);
        this.godArmorManager = new GodArmorManager(this);
        this.doubleJumpListener = new DoubleJumpListener(this, this.godArmorManager);

        this.registerCommand("godarmor", new GodArmorCommand(armorFactory, "godarmor.give", null));
        this.registerCommand("godhelmet", new GodArmorCommand(armorFactory, "godarmor.helmet", ArmorFactory.HELMET));
        this.registerCommand("godchestplate", new GodArmorCommand(armorFactory, "godarmor.chestplate", ArmorFactory.CHESTPLATE));
        this.registerCommand("godleggings", new GodArmorCommand(armorFactory, "godarmor.leggings", ArmorFactory.LEGGINGS));
        this.registerCommand("godboots", new GodArmorCommand(armorFactory, "godarmor.boots", ArmorFactory.BOOTS));

        Bukkit.getPluginManager().registerEvents(
                new ArmorListener(this, this.godArmorManager, this.doubleJumpListener),
                this
        );
        Bukkit.getPluginManager().registerEvents(this.doubleJumpListener, this);
        Bukkit.getPluginManager().registerEvents(new FallDamageListener(this.godArmorManager), this);

        Bukkit.getOnlinePlayers().forEach(this.godArmorManager::initializePlayer);
        Bukkit.getOnlinePlayers().forEach(this.doubleJumpListener::refreshFlightState);

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            this.godArmorManager.refreshOnlinePlayers();
            this.doubleJumpListener.refreshOnlinePlayers();
        }, 20L, 20L);
    }

    @Override
    public void onDisable() {
        if (this.doubleJumpListener != null) {
            this.doubleJumpListener.resetFlightStates();
        }

        if (this.godArmorManager != null) {
            this.godArmorManager.shutdown();
        }
    }

    private void registerCommand(String commandName, GodArmorCommand executor) {
        PluginCommand command = this.getCommand(commandName);
        if (command == null) {
            throw new IllegalStateException("The " + commandName + " command is missing from plugin.yml.");
        }
        command.setExecutor(executor);
    }

    public GodArmorManager getGodArmorManager() {
        return Objects.requireNonNull(this.godArmorManager, "GodArmorManager has not been initialized.");
    }
}