endzone_xd
📎 1 file 8,056 chars
📄
pasted-code-1784882232845.txt
txt 520 lines
▶
Create a production-quality Minecraft Paper plugin for Java Edition 1.21.8 called "EndZEnchant".

The plugin must be optimized, fully configurable, use Java 21, compile without errors, and support Paper 1.21.8.

=====================================================
PLUGIN PURPOSE
=====================================================

Admins can secretly give any vanilla enchantment to any player.

The player should think they received a random enchantment.

Viewers watching videos or streams should also believe the enchantment is random.

Only the admin knows which enchantment was actually given.

=====================================================
COMMAND
=====================================================

/endzenchant give   

Examples:

/endzenchant give Steve sharpness 5
/endzenchant give Alex riptide 1
/endzenchant give EndZone_XD infinity 1

Permission:

endzenchant.admin

=====================================================
PLAYER EXPERIENCE
=====================================================

The command should NOT instantly enchant an item.

Instead the player receives an Enchantment Session.

Immediately play:

- End Portal Sound
- Beacon Activate
- Glitch/Hacking style sounds

Display a large title.

TITLE:

YOUR ENCHANTMENT

Subtitle:

Display animated random glitch text.

Example:

XA@9K#
P_91!L
J8D$1M
QX2&7A
L#P91S

The text should change every 2-3 ticks.

It must NEVER reveal the real enchantment during the animation.

It should look like a hacking/loading screen.

=====================================================
COUNTDOWN
=====================================================

Display an ActionBar.

Receiving Enchantment...

10
9
8
7
6
5
4
3
2
1

Update every second.

=====================================================
FINAL REVEAL
=====================================================

When countdown reaches zero:

Play:

Level Up Sound

Particle Explosion

Flash Effect

Reveal the REAL enchantment.

Example:

YOUR ENCHANTMENT

SHARPNESS V

or

RIPTIDE I

or

INFINITY I

Reveal it for about 0.5-1 second.

Immediately enchant the item currently held in the player's MAIN HAND.

If the player changes the held item during countdown, enchant whichever item is held when the countdown ends.

=====================================================
UNIVERSAL ENCHANTMENT SYSTEM
=====================================================

Remove every vanilla enchantment restriction.

Every vanilla enchantment can be applied to EVERY Minecraft item.

No whitelist.

No blacklist.

No incompatible enchantment checks.

Examples:

Sharpness on Apple

Sharpness on Stick

Sharpness on Chestplate

Sharpness on Elytra

Protection on Sword

Protection on Pickaxe

Thorns on Sword

Thorns on Shield

Infinity on Totem

Infinity on Golden Apple

Infinity on Ender Pearl

Infinity on Potion

Infinity on Firework

Riptide on Sword

Riptide on Pickaxe

Riptide on Axe

Riptide on Elytra

Looting on Pickaxe

Fortune on Sword

Silk Touch on Axe

Fire Aspect on Helmet

Everything should be enchantable.

=====================================================
KEEP VANILLA MECHANICS
=====================================================

Do NOT invent new enchantments.

Every enchantment must keep its original vanilla behavior.

Only remove the item restrictions.

Examples:

Sharpness

Adds melee damage regardless of held item.

Knockback

Knocks enemies farther away with every melee item.

Fire Aspect

Burns enemies from every melee item.

Looting

Extra mob drops regardless of weapon.

Sweeping Edge

Works on every melee item.

Fortune

Extra drops regardless of tool.

Silk Touch

Preserves mined blocks regardless of tool.

Efficiency

Increases mining speed regardless of item.

Unbreaking

Works normally.

Mending

Works normally.

Protection

If the enchanted item is held OR worn,
Protection should work.

Projectile Protection

Works while held or worn.

Blast Protection

Works while held or worn.

Fire Protection

Works while held or worn.

Thorns

If the enchanted item is held OR worn,
attackers receive Thorns damage.

Respiration

Works while held or worn.

Aqua Affinity

Works while held or worn.

Depth Strider

Works while held or worn.

Feather Falling

Works while held or worn.

Soul Speed

Works while held or worn.

Swift Sneak

Works while held or worn.

Frost Walker

Works while held or worn.

=====================================================
SPECIAL ENCHANTMENTS
=====================================================

Riptide

Works on EVERY held item.

No water required.

No rain required.

Launch the player exactly like vanilla Riptide.

Channeling

Works in every weather.

Always summons lightning.

Loyalty

Returns every throwable weapon or custom projectile.

Impaling

Extra aquatic damage regardless of weapon.

Piercing

Works normally.

Power

Works on every ranged weapon.

Punch

Works normally.

Flame

Works normally.

Density

Keeps its vanilla mace damage calculations.

Can be placed on every melee weapon.

Breach

Keeps vanilla armor penetration.

Can be placed on every melee weapon.

If an Axe has:

Sharpness V

+

Breach IV

Both enchantments should stack.

Sharpness increases damage.

Breach ignores armor.

Both effects activate together.

=====================================================
INFINITY ENCHANTMENT
=====================================================

Infinity should make the enchanted item permanently reusable.

If ANY item has the Infinity enchantment, using that item must NEVER reduce its amount.

Examples:

Golden Apple + Infinity

The player can eat ONE Golden Apple forever.

The stack size never decreases.

Enchanted Golden Apple + Infinity

Unlimited uses.

Never consumed.

Totem of Undying + Infinity

The Totem activates normally.

The player is revived.

The Totem remains in inventory.

Unlimited Totem pops.

Ender Pearl + Infinity

Unlimited throws.

Never consumed.

Snowballs + Infinity

Unlimited throws.

Eggs + Infinity

Unlimited throws.

Potion + Infinity

Unlimited drinks.

Never consumed.

Splash Potion + Infinity

Unlimited throws.

Lingering Potion + Infinity

Unlimited throws.

Firework Rocket + Infinity

Unlimited Elytra boosting.

Trident + Infinity

Unlimited throws.

Never leaves inventory.

Arrows + Infinity

Unlimited arrows.

Any edible item

Any throwable item

Any consumable item

Any usable item

With Infinity:

It must NEVER disappear.

It must NEVER decrease.

It must NEVER be consumed.

It works exactly like vanilla,

but can be used forever.

Infinity items should also never break due to durability.

=====================================================
ANVIL
=====================================================

Allow every enchantment combination.

Ignore vanilla restrictions.

Players can freely combine any enchantment onto any item.

=====================================================
CONFIG
=====================================================

config.yml

Enable/Disable particles

Enable/Disable sounds

Countdown length

Titles

Messages

Permissions

Glitch animation speed

=====================================================
CODE QUALITY
=====================================================

Use Java 21.

Paper API 1.21.8.

No memory leaks.

No unnecessary repeating tasks.

Separate classes.

Managers.

Listeners.

Commands.

Utilities.

Proper OOP.

Well documented.

Optimized for multiplayer servers.

plugin.yml included.

Complete source code.

Must compile successfully with zero errors.
Kodari AI
KodariJul 24 at 8:43 am 3

I’ll create the EndZEnchant plugin — a secret enchantment administration plugin with animated reveal sessions and universal enchantment support.

EndZEnchant
Secret enchantment administration plugin for Paper 1.21.8. Admins secretly give any vanilla enchantment to any player with a randomized animated reveal sequence. Features a hacking-style title animation with glitch text, countdown action bar, and cinematic reveal with sounds and particles. Removes ALL vanilla enchantment restrictions — every enchantment works on every item. Infinity makes items permanently reusable. Riptide requires no water. Protection and Thorns work on held items. Anvil allows any enchantment combination.

Let me create all 12 files:

Kodari can make mistakes. Review important code before using.
Files
EndZEnchant
Code
12 773
EndZEnchant/src/main/java/com/endzenchant/EndZEnchant.java
package com.endzenchant;

import com.endzenchant.command.EndZEnchantCommand;
import com.endzenchant.listener.AnvilListener;
import com.endzenchant.listener.EnchantmentListener;
import com.endzenchant.manager.ConfigManager;
import com.endzenchant.manager.SessionManager;
import org.bukkit.plugin.java.JavaPlugin;

public class EndZEnchant extends JavaPlugin {
    private ConfigManager configManager;
    private SessionManager sessionManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.sessionManager = new SessionManager(this, configManager);

        EndZEnchantCommand command = new EndZEnchantCommand(this, configManager, sessionManager);
        this.getCommand("endzenchant").setExecutor(command);
        this.getCommand("endzenchant").setTabCompleter(command);

        this.getServer().getPluginManager().registerEvents(new EnchantmentListener(this, configManager), this);
        this.getServer().getPluginManager().registerEvents(new AnvilListener(this), this);

        this.getLogger().info("EndZEnchant has been enabled!");
    }

    @Override
    public void onDisable() {
        if (sessionManager != null) {
            sessionManager.cancelAll();
        }
        this.getLogger().info("EndZEnchant has been disabled!");
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }

    public SessionManager getSessionManager() {
        return sessionManager;
    }
}