jrxworld19
📎 1 file 5,494 chars
📄
pasted-code-1783980854225.txt
txt 322 lines
▶
# Create a Complete Minecraft Paper Plugin

## General Information

Create a complete, professional, and production-ready Minecraft plugin for **Paper 1.21.11** using **Java 21** and **Maven**.

### Plugin Name

GodArmor

### Package

`com.zenuxs.godarmor`

### Main Class

`com.zenuxs.godarmor.GodArmorPlugin`

### Command

`/godarmor`

### Permission

`godarmor.use`

Only OPs or players with the permission `godarmor.use` can use this command.

---

# Command

When a player executes `/godarmor`, they instantly receive a complete custom armor set called **Daemon Armor**.

The armor should automatically equip if the player's armor slots are empty; otherwise, it should be added to the inventory.

Every armor piece must be:

* Unbreakable
* Full enchanted using unsafe enchantments
* Have hidden enchantments
* Have custom names
* Have custom lore
* Have colored names
* Have custom model data support
* Impossible to lose durability

---

# Daemon Helmet

Material:
Netherite Helmet

Display Name:
**§4§lDaemon Helmet**

Enchantments:

* Protection X
* Unbreaking X
* Mending
* Respiration X
* Aqua Affinity
* Thorns V

Abilities while worn:

* Infinite Strength II
* Infinite Resistance
* Infinite Saturation
* Night Vision
* Fire Resistance
* Water Breathing

These potion effects must automatically refresh every second.

When the helmet is removed, all helmet abilities must immediately disappear.

---

# Daemon Chestplate

Material:
Netherite Chestplate

Display Name:
**§4§lDaemon Chestplate**

Enchantments:

* Protection X
* Unbreaking X
* Mending
* Thorns V

Abilities:

* Increase maximum health to **30 Hearts (60 HP)**
* Instantly heal to full health
* Fire immunity
* Lava immunity
* Knockback resistance

When removed:

* Maximum health returns to the normal value.

---

# Daemon Leggings

Material:
Netherite Leggings

Display Name:
**§4§lDaemon Leggings**

Enchantments:

* Protection X
* Unbreaking X
* Mending
* Thorns V

Abilities:

* Infinite Regeneration I
* Speed II
* Jump Boost II

Potion effects should refresh continuously while equipped.

---

# Daemon Boots

Material:
Netherite Boots

Display Name:
**§4§lDaemon Boots**

Enchantments:

* Protection X
* Unbreaking X
* Mending
* Feather Falling X
* Soul Speed III
* Depth Strider III
* Thorns V

Abilities:

* No fall damage
* Walk on water
* Dolphin's Grace
* Ability to fly while wearing the full armor set

When the boots are removed:

* Flying is disabled immediately.
* Water walking is disabled.

---

# Flying Ability

While wearing the complete Daemon Armor set:

* Enable survival flight.
* Player can freely fly.

When any armor piece is removed:

* Flight is disabled instantly.

---

# Water Walking

While wearing the Daemon Boots:

* The player can walk across the surface of water without sinking.

---

# Fall Damage

While wearing the Daemon Boots:

* Completely cancel all fall damage.

---

# Power Mode

Activation:

Press **Shift + Right Click** while wearing the complete Daemon Armor set.

Requirements:

* Helmet equipped
* Chestplate equipped
* Leggings equipped
* Boots equipped

Power Mode Duration:

**60 seconds**

Cooldown:

**30 seconds**

Power Mode cannot be activated during cooldown.

Display cooldown in the Action Bar.

Display a Boss Bar showing the remaining Power Mode time.

Play sounds and particles when activated.

---

# Power Mode Combat Ability

While Power Mode is active:

Whenever the player attacks another player with any sword:

* If the target is holding a Totem of Undying, consume the totem and trigger its protection effect if possible according to the server's mechanics.
* Launch the target high into the air.
* Play lightning and explosion visual effects (visual only, no terrain damage).
* Spawn redstone and flame particles.
* Play an Ender Dragon sound.
* Apply:

  * Blindness
  * Slowness
  * Weakness

Power Mode automatically ends after 60 seconds.

The Boss Bar disappears.

The cooldown starts immediately after Power Mode ends.

---

# Additional Features

* Armor cannot lose durability.
* Armor should remain fully functional after server restarts.
* Potion effects must automatically refresh.
* Flight permissions should never remain enabled after armor removal.
* The plugin should prevent bugs or exploits.

---

# Configuration Files

Generate:

* plugin.yml
* config.yml
* messages.yml

Allow configuration of:

* Power Mode duration
* Cooldown
* Strength level
* Resistance level
* Regeneration level
* Maximum health
* Sounds
* Particles
* Messages

---

# Code Requirements

Use:

* Java 21
* Paper 1.21.11 API
* Maven
* Object-Oriented Programming (OOP)
* Proper package structure
* Managers
* Listeners
* Commands
* Utility classes
* No deprecated APIs
* No NMS
* No external dependencies except the Paper API

---

# Project Structure

Generate the complete Maven project, including:

* pom.xml
* plugin.yml
* config.yml
* messages.yml
* Main class
* Command classes
* Event listeners
* Ability manager
* Cooldown manager
* Power Mode manager
* Utility classes
* Every required Java file

The project must compile successfully with no errors and produce a working **GodArmor.jar** for **Paper 1.21.11**.
Kodari AI
KodariJul 14 at 4:17 pm 13
GodArmor
A production-ready Paper 1.21.11 plugin that provides a powerful Daemon Armor set through the /godarmor command. The plugin creates unbreakable, enchanted armor with custom names, lore, model data, and configurable abilities. It supports automatic armor equipping, potion effects, increased health, fire and fall protection, water walking, survival flight, Power Mode combat abilities, boss bars, cooldowns, particles, sounds, restart-safe item identification, and fully configurable messages.
  1. Create the Maven project and Paper plugin metadata.

  2. Implement Daemon Armor creation, identification, enchanting, lore, and custom model data.

  3. Add armor abilities, automatic effect refresh, health modifiers, flight, water walking, fall protection, and durability prevention.

  4. Add the /godarmor command and Power Mode activation, cooldown, boss bar, combat effects, and visual feedback.

  5. Add configuration and message files for all requested settings.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
13 1,140
src/main/java/com/zenuxs/godarmor/GodArmorPlugin.java
package com.zenuxs.godarmor;

import com.zenuxs.godarmor.ability.AbilityManager;
import com.zenuxs.godarmor.armor.ArmorManager;
import com.zenuxs.godarmor.command.GodArmorCommand;
import com.zenuxs.godarmor.listener.ArmorListener;
import com.zenuxs.godarmor.power.CooldownManager;
import com.zenuxs.godarmor.power.PowerModeManager;
import com.zenuxs.godarmor.util.MessageUtil;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class GodArmorPlugin extends JavaPlugin {
    private ArmorManager armorManager;
    private AbilityManager abilityManager;
    private CooldownManager cooldownManager;
    private PowerModeManager powerModeManager;
    private MessageUtil messageUtil;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("messages.yml", false);

        this.messageUtil = new MessageUtil(this);
        this.armorManager = new ArmorManager(this);
        this.cooldownManager = new CooldownManager();
        this.powerModeManager = new PowerModeManager(this, armorManager, cooldownManager, messageUtil);
        this.abilityManager = new AbilityManager(this, armorManager);

        GodArmorCommand command = new GodArmorCommand(armorManager, powerModeManager, messageUtil);
        if (getCommand("godarmor") != null) {
            getCommand("godarmor").setExecutor(command);
            getCommand("godarmor").setTabCompleter(command);
        }

        Bukkit.getPluginManager().registerEvents(
                new ArmorListener(armorManager, abilityManager, powerModeManager),
                this
        );

        Bukkit.getScheduler().runTaskTimer(this, abilityManager::tick, 1L, 1L);
        Bukkit.getScheduler().runTaskTimer(this, powerModeManager::tick, 1L, 1L);
    }

    @Override
    public void onDisable() {
        if (powerModeManager != null) {
            powerModeManager.shutdown();
        }
        if (abilityManager != null) {
            abilityManager.shutdown();
        }
    }

    public ArmorManager getArmorManager() {
        return armorManager;
    }

    public AbilityManager getAbilityManager() {
        return abilityManager;
    }

    public PowerModeManager getPowerModeManager() {
        return powerModeManager;
    }

    public MessageUtil getMessageUtil() {
        return messageUtil;
    }
}