aadmiplays
📎 1 file 3,497 chars
📄
pasted-code-1784777794274.txt
txt 142 lines
▶
Create a complete Minecraft PaperMC plugin named GodArmor for PaperMC 1.21.11 using Java 21.

The plugin must add a custom God Armor set that is only recognized if it is created by the plugin.

Command:
/godarmor

Permission:
godarmor.give

The command should give the player the complete God Armor set.

----------------------------------------------------

GOD HELMET

Name:
§6God Helmet

Enchantments:
- Protection V
- Respiration III
- Aqua Affinity I
- Unbreaking III
- Mending I

Effects while equipped:
- Fire Resistance
- Resistance II
- Saturation

When equipped, send this message once:
§6⚡ God Helmet Equipped! Fire cannot stop you.

----------------------------------------------------

GOD CHESTPLATE

Name:
§6God Chestplate

Enchantments:
- Protection V
- Unbreaking III
- Mending I

Effects while equipped:
- Strength III
- +10 Hearts (increase maximum health from 20 to 40)

When equipped, send this message once:
§6⚡ God Chestplate Equipped! Divine strength flows through you.

----------------------------------------------------

GOD LEGGINGS

Name:
§6God Leggings

Enchantments:
- Protection V
- Unbreaking III
- Mending I
- Swift Sneak III

Effects while equipped:
- Speed III
- Complete immunity to fall damage

When equipped, send this message once:
§6⚡ God Leggings Equipped! You move with godlike speed.

----------------------------------------------------

GOD BOOTS

Name:
§6God Boots

Enchantments:
- Protection V
- Unbreaking III
- Mending I
- Feather Falling IV
- Depth Strider III
- Soul Speed III

Effects while equipped:
- Dolphin's Grace
- Double Jump

Double Jump Requirements:
- Player gets one extra jump while in the air.
- Reset the double jump after touching the ground.
- Play suitable particles and sounds when the jump is used.

When equipped, send this message once:
§6⚡ God Boots Equipped! The skies are yours.

----------------------------------------------------

FULL SET BONUS

When all four God Armor pieces are equipped at the same time, grant:

- Regeneration II
- Water Breathing
- Night Vision

Send this message once:
§6⚡ DIVINE POWER ACTIVATED! ⚡

If any one of the armor pieces is removed:

- Remove only the full set bonus effects.
- Send this message once:
§c⚡ DIVINE POWER LOST! ⚡

----------------------------------------------------

MESSAGE RULES

Every armor piece should send its equip message only once when it is equipped.

The message must never spam while the player continues wearing the armor.

If the player removes the armor and equips it again later, the message should appear again.

The same behavior applies to every armor piece and the full set bonus messages.

----------------------------------------------------

OTHER REQUIREMENTS

- Only armor created by this plugin should activate the abilities.
- Removing an armor piece should immediately remove only that piece's abilities.
- Removing the chestplate should restore the player's normal maximum health.
- No fall damage should only be cancelled while God Leggings are equipped.
- The plugin should work after joining, respawning, changing armor, dying, reconnecting, and any normal way of equipping or removing armor.
- The plugin should be smooth, optimized, bug-free, and production-ready.
- The project should compile successfully without any missing classes, missing imports, placeholders, TODOs, or compile errors.
Kodari AI
KodariJul 23 at 3:41 am 14
GodArmor
GodArmor is a Paper 1.21.11 plugin that provides a plugin-authenticated God Armor set with specialized enchantments, persistent fire resistance, divine strength, speed, fall immunity, dolphin’s grace, double jumping, health expansion, and a full-set divine power bonus. The godarmor.give command grants the complete set, while event-driven equipment tracking applies and removes abilities immediately, preserves normal health values, prevents message spam, and handles joins, deaths, respawns, reconnects, and inventory changes.
  1. Create the Maven Java 21 Paper project and plugin metadata.

  2. Implement authenticated God Armor item creation and /godarmor.

  3. Implement equipment tracking, effects, health restoration, full-set transitions, fall immunity, and double jumping.

  4. Register listeners and lifecycle cleanup for all normal player state changes.

GodArmor is a Paper 1.21.11 plugin that provides a plugin-authenticated God Armor set through the /godarmor command. It grants unique protection, movement, combat, underwater, health, fire, fall, and double-jump abilities for each armor piece, with a powerful full-set bonus. Equipment changes are tracked immediately without message spam, effects are removed selectively, health and flight settings are restored safely, and behavior remains consistent across joining, respawning, dying, reconnecting, and normal armor interactions.

[(?)]

GodArmor project initialized with Maven, Paper 1.21.11, Java 21, authenticated armor items, /godarmor, equipment effects, full-set bonuses, health restoration, fall immunity, double jumping, lifecycle handling, and message transition tracking.

aadmiplays

The compilation failed with this error:

java
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 1: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 307: illegal character: ''

java
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 2: class, interface, annotation type, enum, record, method or field expected
package com.kodari.godarmor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 4: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XParticle;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 5: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XPotion;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 6: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XSound;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 7: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XAttribute;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 8: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.Bukkit;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 9: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.attribute.AttributeInstance;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 10: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.entity.Player;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 11: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.entity.EntityDamageEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 12: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerMoveEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 13: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerToggleFlightEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 14: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.inventory.ItemStack;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 15: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.scheduler.BukkitTask;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 16: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.util.Vector;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 18: class, interface, annotation type, enum, record, method or field expected
import java.util.EnumSet;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 19: class, interface, annotation type, enum, record, method or field expected
import java.util.HashMap;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 20: class, interface, annotation type, enum, record, method or field expected
import java.util.HashSet;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 21: class, interface, annotation type, enum, record, method or field expected
import java.util.Map;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 22: class, interface, annotation type, enum, record, method or field expected
import java.util.Set;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 23: class, interface, annotation type, enum, record, method or field expected
import java.util.UUID;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 307: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 1: illegal character: ''

java
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 1: illegal character: '`'
java ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 1: illegal character: ''

java
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 2: class, interface, annotation type, enum, record, method or field expected
package com.kodari.godarmor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 4: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XEnchantment;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 5: class, interface, annotation type, enum, record, method or field expected
import com.cryptomorin.xseries.XMaterial;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 6: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.NamespacedKey;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 7: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.inventory.ItemStack;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 8: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.inventory.meta.ItemMeta;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 9: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.persistence.PersistentDataType;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 11: class, interface, annotation type, enum, record, method or field expected
import java.util.Arrays;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 105: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 105: illegal character: ''

java
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 1: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 105: reached end of file while parsing

java
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 2: class, interface, annotation type, enum, record, method or field expected
package com.kodari.godarmor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 4: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.entity.Player;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 5: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.EventHandler;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 6: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.Listener;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 7: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.entity.EntityDamageEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 8: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.entity.PlayerDeathEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 9: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.inventory.InventoryClickEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 10: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.inventory.InventoryDragEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 11: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerChangedWorldEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 12: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerInteractEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 13: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerJoinEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 14: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerMoveEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 15: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerQuitEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 16: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerRespawnEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 17: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.event.player.PlayerToggleFlightEvent;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 85: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 85: illegal character: ''

java
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 1: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 1: illegal character: ''

java
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 2: class, interface, annotation type, enum, record, method or field expected
package com.kodari.godarmor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 4: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.Bukkit;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 5: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.plugin.java.JavaPlugin;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 29: illegal character: '`'
java ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 1: illegal character: ''

java
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 1: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 29: illegal character: ''

java
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 2: class, interface, annotation type, enum, record, method or field expected
package com.kodari.godarmor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 4: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.command.Command;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 5: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.command.CommandExecutor;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 6: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.command.CommandSender;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 7: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.entity.Player;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 8: class, interface, annotation type, enum, record, method or field expected
import org.bukkit.inventory.ItemStack;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 10: class, interface, annotation type, enum, record, method or field expected
import java.util.Map;
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 34: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 29: reached end of file while parsing

code
Compilation failed with 88 error(s):

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 1: illegal character: '`'

        
code
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 307: reached end of file while parsing
java ^ ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 1: illegal character: '`'
code
 ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorItems.java at line 105: illegal character: '`'
^ ERROR in src/main/java/com/kodari/godarmor/GodArmorManager.java at line 307: illegal character: '`'
^

ERROR in src/main/java/com/kodari/godarmor/GodArmorCommand.java at line 34: illegal character: ''

code
   ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 1: illegal character: '`'

        
code
  ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 85: reached end of file while parsing
java ^ ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 1: illegal character: '`'
code
 ^

ERROR in src/main/java/com/kodari/godarmor/GodArmorPlugin.java at line 29: illegal character: '`'
^ ERROR in src/main/java/com/kodari/godarmor/GodArmorListener.java at line 85: illegal character: '`'
^

=== COMPILATION ERROR ANALYSIS ===

SYNTAX ERRORS: - Line 2: class, interface, annotation type, enum, record, method or field expected - Line 4: class, interface, annotation type, enum, record, method or field expected - Line 5: class, interface, annotation type, enum, record, method or field expected - Line 6: class, interface, annotation type, enum, record, method or field expected - Line 7: class, interface, annotation type, enum, record, method or field expected - Line 8: class, interface, annotation type, enum, record, method or field expected - Line 9: class, interface, annotation type, enum, record, method or field expected - Line 10: class, interface, annotation type, enum, record, method or field expected - Line 11: class, interface, annotation type, enum, record, method or field expected - Line 12: class, interface, annotation type, enum, record, method or field expected - Line 13: class, interface, annotation type, enum, record, method or field expected - Line 14: class, interface, annotation type, enum, record, method or field expected - Line 15: class, interface, annotation type, enum, record, method or field expected - Line 16: class, interface, annotation type, enum, record, method or field expected - Line 18: class, interface, annotation type, enum, record, method or field expected - Line 19: class, interface, annotation type, enum, record, method or field expected - Line 20: class, interface, annotation type, enum, record, method or field expected - Line 21: class, interface, annotation type, enum, record, method or field expected - Line 22: class, interface, annotation type, enum, record, method or field expected - Line 23: class, interface, annotation type, enum, record, method or field expected - Line 2: class, interface, annotation type, enum, record, method or field expected - Line 4: class, interface, annotation type, enum, record, method or field expected - Line 5: class, interface, annotation type, enum, record, method or field expected - Line 6: class, interface, annotation type, enum, record, method or field expected - Line 7: class, interface, annotation type, enum, record, method or field expected - Line 8: class, interface, annotation type, enum, record, method or field expected - Line 9: class, interface, annotation type, enum, record, method or field expected - Line 11: class, interface, annotation type, enum, record, method or field expected - Line 2: class, interface, annotation type, enum, record, method or field expected - Line 4: class, interface, annotation type, enum, record, method or field expected - Line 5: class, interface, annotation type, enum, record, method or field expected - Line 6: class, interface, annotation type, enum, record, method or field expected - Line 7: class, interface, annotation type, enum, record, method or field expected - Line 8: class, interface, annotation type, enum, record, method or field expected - Line 9: class, interface, annotation type, enum, record, method or field expected - Line 10: class, interface, annotation type, enum, record, method or field expected - Line 11: class, interface, annotation type, enum, record, method or field expected - Line 12: class, interface, annotation type, enum, record, method or field expected - Line 13: class, interface, annotation type, enum, record, method or field expected - Line 14: class, interface, annotation type, enum, record, method or field expected - Line 15: class, interface, annotation type, enum, record, method or field expected - Line 16: class, interface, annotation type, enum, record, method or field expected - Line 17: class, interface, annotation type, enum, record, method or field expected - Line 2: class, interface, annotation type, enum, record, method or field expected - Line 4: class, interface, annotation type, enum, record, method or field expected - Line 5: class, interface, annotation type, enum, record, method or field expected - Line 2: class, interface, annotation type, enum, record, method or field expected - Line 4: class, interface, annotation type, enum, record, method or field expected - Line 5: class, interface, annotation type, enum, record, method or field expected - Line 6: class, interface, annotation type, enum, record, method or field expected - Line 7: class, interface, annotation type, enum, record, method or field expected - Line 8: class, interface, annotation type, enum, record, method or field expected - Line 10: class, interface, annotation type, enum, record, method or field expected ACTION: Check for missing semicolons or brackets

FILES TO INVESTIGATE: - src/main/java/com/kodari/godarmor/GodArmorManager.java - src/main/java/com/kodari/godarmor/GodArmorItems.java - src/main/java/com/kodari/godarmor/GodArmorListener.java - src/main/java/com/kodari/godarmor/GodArmorPlugin.java - src/main/java/com/kodari/godarmor/GodArmorCommand.java

``

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 23 at 3:45 am 5
  1. Remove the accidental Markdown code fences from the Java sources.

  2. Preserve the existing GodArmor implementation and Maven project structure while correcting only the source-file syntax issue.

  3. Recheck project metadata and all affected Java files for any remaining fence markers or truncation.

Fixed the project artifact:

  • Removed accidental Markdown fences from all Java files, pom.xml, and plugin.yml.

  • Corrected the XParticle import to com.cryptomorin.xseries.particles.XParticle.

  • Preserved Maven-only configuration with Java 21 and Paper API.

  • No build.gradle file was created.

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

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class GodArmorPlugin extends JavaPlugin {
    private GodArmorManager armorManager;

    @Override
    public void onEnable() {
        this.armorManager = new GodArmorManager(this);
        Bukkit.getPluginManager().registerEvents(new GodArmorListener(armorManager), this);
        getCommand("godarmor").setExecutor(new GodArmorCommand());
        armorManager.start();
    }

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

    public GodArmorManager getArmorManager() {
        return armorManager;
    }
}