xadrox_7
📎 1 file 12,327 chars
📄
pasted-code-1790841171840.txt
txt 626 lines
▶
# GOATED SMP — CUSTOM GOD WEAPONS PLUGIN

Create a premium, highly optimized Minecraft Paper 1.21.4 plugin named **GoatedWeapons**, created and developed by **XadroX7**.

The plugin is specifically designed for **GOATED SMP** and introduces exactly TWO legendary custom weapons:

1. **OBLIVION** — The GOATED Mace
2. **ETERNITY** — The GOATED Sword

Both weapons must have completely custom, extremely powerful abilities that feel far beyond normal vanilla Minecraft mechanics.

The plugin must prioritize **0 unnecessary server lag, optimized code, exploit protection, cinematic abilities, custom sounds, custom particles, cooldowns, and a premium PvP experience.**

---

# 1. OBLIVION — THE GOATED MACE

**Base Item:** MACE

**Enchantments:**

* Density VII
* Wind Burst II
* Unbreaking X
* Mending

**Theme:** Crimson + Black + Void + Gravity + Destruction

### ITEM LORE

§4§l✦ OBLIVION ✦
§8The Mace Beyond Destruction
§7
§c✦ §fVOID CRUSH §8- §7Right Click
§c✦ §fSKY BREAKER §8- §7Sneak + Right Click
§c✦ §fGRAVITY WELL §8- §7Press G
§c✦ §fMETEOR FALL §8- §7Press H
§c✦ §fOBLIVION MODE §8- §7Double Sneak
§7
§4§lGOATED WEAPON
§8Forged for the strongest.

---

## ABILITY 1 — VOID CRUSH

**Key:** Right Click

The player smashes the mace and releases a gigantic crimson-black shockwave.

Features:

* 12-block radius.
* Custom circular shockwave.
* Crimson and black energy particles.
* Heavy knockback.
* Configurable damage.
* Ground-crack visual effect.
* Custom impact sound.
* Multiple enemies can be affected.
* Terrain must NOT be destroyed.

**Cooldown:** 18 seconds.

---

## ABILITY 2 — SKY BREAKER

**Key:** Sneak + Right Click

Launch the player into the air and perform a devastating aerial mace slam.

Features:

* Launch player upward.
* Create a target indicator below.
* Player falls toward target.
* Massive impact animation.
* Multiple shockwave rings.
* Heavy knockback.
* Configurable damage.
* Custom sound.
* Cinematic crimson explosion.

**Cooldown:** 30 seconds.

---

## ABILITY 3 — GRAVITY WELL

**Key:** G

Create a giant black-red gravitational vortex.

Features:

* 10-block radius.
* Pull nearby enemies toward the center.
* Dark swirling particles.
* Crimson energy rings.
* 3-second duration.
* Configurable pull strength.
* Configurable damage.
* No permanent movement lock.

**Cooldown:** 35 seconds.

---

## ABILITY 4 — METEOR FALL

**Key:** H

Summon five massive magical meteors from the sky.

Features:

* Five sequential impacts.
* Custom red meteor trails.
* Large impact effects.
* Configurable damage.
* Area knockback.
* Unique impact sound for every meteor.
* Terrain destruction disabled by default.
* Maximum particle count configurable.

**Cooldown:** 45 seconds.

---

## ULTIMATE — OBLIVION MODE

**Key:** Double Sneak

Duration: 8 seconds.

During this mode:

* Mace receives a powerful visual aura.
* Crimson-black energy surrounds the player.
* VOID CRUSH receives an enhanced visual effect.
* Additional shockwave appears.
* Custom activation animation.
* Custom ultimate sound.
* Boss-bar-style duration indicator.

**Cooldown:** 90 seconds.

---

# 2. ETERNITY — THE GOATED SWORD

**Base Item:** NETHERITE_SWORD

**Enchantments:**

* Sharpness VI
* Fire Aspect II
* Unbreaking X
* Looting III
* Mending

**Theme:** Cyan + Ice Blue + Silver + Dimensional Energy + Time

### ITEM LORE

§b§l✦ ETERNITY ✦
§8The Sword Beyond Time
§7
§b✦ §fPHANTOM SLASH §8- §7Right Click
§b✦ §fINSTANT TRANSMISSION §8- §7Sneak + Right Click
§b✦ §fDIMENSION CUT §8- §7Press G
§b✦ §fTIME FRACTURE §8- §7Press H
§b✦ §fETERNITY AWAKENED §8- §7Double Sneak
§7
§b§lGOATED WEAPON
§8A blade that cuts through dimensions.

---

## ABILITY 1 — PHANTOM SLASH

**Key:** Right Click

Fire a gigantic cyan dimensional sword slash.

Features:

* 15-block range.
* Custom sword-shaped projectile.
* Multiple enemies can be hit.
* Cyan energy trail.
* Afterimage effect.
* Custom slash sound.
* Configurable damage.
* Unique hit animation.

**Cooldown:** 12 seconds.

---

## ABILITY 2 — INSTANT TRANSMISSION

**Key:** Sneak + Right Click

Perform a high-speed dimensional dash.

Features:

* Up to 12-block directional teleport.
* Blue afterimages.
* Custom teleport sound.
* Arrival energy burst.
* Collision detection.
* Cannot teleport into blocks.
* Cannot teleport into lava.
* Cannot teleport into protected regions.

**Cooldown:** 15 seconds.

---

## ABILITY 3 — DIMENSION CUT

**Key:** G

Perform an enormous dimensional sword slash.

Features:

* 20-block range.
* Huge cyan energy blade.
* Multiple enemies hit along the path.
* Dimensional distortion particles.
* Custom slash animation.
* Custom sound.
* Configurable damage.

**Cooldown:** 28 seconds.

---

## ABILITY 4 — TIME FRACTURE

**Key:** H

Create a temporary time-distortion field.

Features:

* 9-block radius.
* Temporarily slows nearby enemies.
* Cyan circular time field.
* Clock-like particles.
* Distortion effects.
* Custom activation sound.
* Custom expiration sound.

**Cooldown:** 35 seconds.

---

## ULTIMATE — ETERNITY AWAKENED

**Key:** Double Sneak

Duration: 10 seconds.

During this mode:

* Sword visually transforms.
* Cyan/red aura surrounds the player.
* Phantom Slash receives additional visual slashes.
* Dimension Cut receives increased range.
* Custom awakening animation.
* Custom ultimate sound.
* Boss-bar-style duration indicator.

**Cooldown:** 90 seconds.

---

# 3. CUSTOM CRAFTING SYSTEM

Both weapons must have extremely expensive custom crafting recipes.

Create a custom item:

**ANCIENT CORE**

The Ancient Core must have:

* Unique display name.
* Custom lore.
* PersistentDataContainer identification.
* Resource-pack-ready CustomModelData.
* Custom crafting requirements.

---

## OBLIVION CRAFTING RECIPE

Ingredients:

* 1 Nether Star
* 1 Heavy Core
* 2 Netherite Blocks
* 2 Echo Shards
* 1 Dragon Breath
* 1 Ancient Core

Exact 3×3 recipe:

[Nether Star] [Netherite Block] [Nether Star]

[Echo Shard] [Heavy Core] [Echo Shard]

[Netherite Block] [Ancient Core] [Dragon Breath]

Result:

**OBLIVION**

---

## ETERNITY CRAFTING RECIPE

Ingredients:

* 1 Nether Star
* 2 Netherite Blocks
* 2 Echo Shards
* 1 Dragon Head
* 1 Heart of the Sea
* 1 Ancient Core

Exact 3×3 recipe:

[Netherite Block] [Echo Shard] [Netherite Block]

[Dragon Head] [Ancient Core] [Echo Shard]

[Heart of the Sea] [Nether Star] [EMPTY]

Result:

**ETERNITY**

Recipes must validate exact custom items and prevent duplication exploits.

---

# 4. KEY INPUT SYSTEM

Important technical limitation:

A normal Paper plugin cannot directly detect arbitrary keyboard keys such as G and H.

Implement:

* Right Click through Paper interaction events.
* Sneak + Right Click combinations.
* Double Sneak detection with debounce.
* G/H through an optional **GOATED SMP Fabric companion mod**.
* Companion mod sends secure plugin messages to the server.
* Server validates every ability request.
* Provide configurable fallback commands if the companion mod is unavailable.

Default keybinds:

G = Ability 3

H = Ability 4

Double Sneak = Ultimate

All keybinds must be configurable.

---

# 5. PREMIUM VISUAL EFFECTS

## OBLIVION

Use:

* Crimson energy.
* Black void particles.
* Red lightning-style particles.
* Circular shockwaves.
* Dark smoke.
* Gravity vortex effects.
* Meteor trails.
* Crimson aura.

## ETERNITY

Use:

* Cyan energy.
* Ice-blue particles.
* Dimensional slash effects.
* Blue afterimages.
* Time distortion rings.
* Crystal-like particles.
* Cyan aura.

Do NOT spam particles continuously.

All visual effects must be optimized and configurable.

---

# 6. ZERO-UNNECESSARY-LAG ARCHITECTURE

Performance is extremely important.

The plugin must be written by **XadroX7** with optimization as a core requirement.

Requirements:

* No unnecessary repeating tasks.
* No full-world entity scans.
* No expensive calculations every tick.
* No permanent invisible entities.
* No unnecessary armor stands.
* No unnecessary chunk loading.
* No uncontrolled particle spawning.
* Use small-radius entity queries.
* Efficient cooldown maps.
* Clean up all temporary tasks.
* Support multiple players using abilities simultaneously.
* No memory leaks.
* Avoid unnecessary object allocation.
* Configurable particle limits.
* Configurable maximum targets.
* Never block the main server thread.
* Database/file operations must not block gameplay.
* All Bukkit world/entity modifications must occur safely on the correct server thread.

Do not claim literal zero lag. The goal is extremely low overhead under realistic multiplayer usage.

---

# 7. SECURITY / EXPLOIT PROTECTION

Identify weapons using:

**PersistentDataContainer**

Never identify weapons using display names alone.

Implement:

* Duplication protection.
* Recipe exploit protection.
* Ability spam protection.
* Server-side cooldown validation.
* Secure companion-mod packet validation.
* Weapon ownership validation.
* Protected-region checks.
* Friendly-fire configuration.
* Spectator protection.
* Safe teleport validation.
* Admin permissions.

---

# 8. ADMIN COMMANDS

/tw give  oblivion

/tw give  eternity

/tw give  ancientcore

/tw reload

/tw info

/tw debug

/tw cooldown  reset

Permissions:

treacheryweapons.admin

treacheryweapons.give

treacheryweapons.use

Rename permission namespace appropriately for **GoatedWeapons**.

---

# 9. CONFIGURATION

Create a complete config.yml containing:

* Ability damage.
* Ability radius.
* Cooldowns.
* Ultimate duration.
* Particle limits.
* Maximum affected entities.
* Sounds.
* Friendly-fire settings.
* Protected regions.
* Crafting toggles.
* Debug mode.
* Companion-mod requirement.
* Performance settings.
* Ability enable/disable settings.

Every balance value must be configurable.

---

# 10. PROJECT STRUCTURE

Create a professional Gradle project:

GoatedWeapons/

├── build.gradle
├── settings.gradle
├── README.md
│
└── src/main/
├── java/
│   └── com/xadrox7/goatedweapons/
│       ├── GoatedWeapons.java
│       ├── weapons/
│       ├── abilities/
│       ├── cooldowns/
│       ├── crafting/
│       ├── effects/
│       ├── listeners/
│       ├── commands/
│       ├── networking/
│       └── utils/
│
└── resources/
├── plugin.yml
└── config.yml

If the G/H system requires a companion Fabric mod, create a separate Gradle project for it.

---

# 11. PLUGIN IDENTITY

Plugin name:

**GoatedWeapons**

Minecraft server:

**GOATED SMP**

Developer:

**XadroX7**

Add startup message:

§b§lGOATED SMP
§7Custom Weapons System
§8Developed by §bXadroX7
§aGoatedWeapons enabled successfully.

Do not use the previous name "Treachery" anywhere in the plugin.

All branding must use:

**GOATED SMP**
**XadroX7**
**GoatedWeapons**

---

# 12. FINAL DELIVERABLES

Provide:

1. Complete Java source code.
2. Complete Gradle project.
3. plugin.yml.
4. config.yml.
5. Complete crafting recipes.
6. Complete ability implementations.
7. Optional Fabric companion mod.
8. Installation instructions.
9. Build instructions.
10. Compiled plugin JAR.
11. Testing report.
12. Performance test results.
13. Exploit testing.
14. Multiplayer stress testing.

Do NOT provide pseudo-code.

Do NOT provide placeholder methods.

Do NOT leave abilities unfinished.

Every ability listed above must actually work.

Test:

* Both weapons.
* Every ability.
* Cooldowns.
* Crafting.
* Custom item identification.
* Simultaneous players.
* G/H networking.
* Teleport safety.
* Duplication prevention.
* Particle limits.
* Performance.
* Server restart persistence.

The final result must feel like a **premium custom Minecraft PvP weapons system created specifically for GOATED SMP by XadroX7**, with gameplay far beyond normal vanilla Minecraft.
Kodari AI
KodariOct 1 at 8:05 am 41
GoatedWeapons
Premium custom weapons plugin for GOATED SMP featuring two legendary weapons: OBLIVION mace with Void Crush, Sky Breaker, Gravity Well, Meteor Fall, and Oblivion Mode ultimate; ETERNITY sword with Phantom Slash, Instant Transmission, Dimension Cut, Time Fracture, and Eternity Awakened ultimate. Includes custom crafting recipes with Ancient Core, PersistentDataContainer-based identification, configurable cooldowns and damage, optimized particle effects, secure ability validation, optional companion mod support for G/H keys, double-sneak ultimates, boss-bar duration indicators, and comprehensive admin commands with full configuration.
  1. Build the Paper plugin with both weapons, all ten abilities, bounded effects, cooldowns, and protection checks.

  2. Add exact crafting, ownership validation, commands, configuration, and secure G/H messaging.

  3. Create the optional Fabric companion with configurable G/H bindings.

  4. Document building, installation, and verification; distinguish implemented safeguards from tests requiring a live server.

Created GoatedWeapons for Paper 1.21.4, branded for GOATED SMP by XadroX7.

Included:

  • Both legendary weapons and all ten ability implementations.

  • Exact crafting recipes, signed PDC identification, soulbinding, cooldowns, and bounded particle effects.

  • Protection checks, admin commands, and configuration.

  • Separate Fabric companion with remappable G/H controls.

  • Build/install instructions, JUnit tests, and a live-server verification plan.

Build the plugin

Shell
gradle clean build

Output: build/libs/GoatedWeapons-1.0.0.jar

Build the companion

Shell
gradle -p companion-mod clean build

Requires Java 21. See README.md and TESTING.md.

Verification limitation: compilation, live gameplay, exploit checks, and multiplayer benchmarks were not executed here. No compiled JAR or measured performance results are attached. Duplication safeguards are documented without claiming universal duplicate detection.

xadrox_7
1 image attached
Kodari AI
KodariOct 1 at 8:21 am 4

The screenshot appears to show Creative mode. Creative abilities are disabled by default, but the code incorrectly reports that as an invalid weapon.

  • Separate protection failures from weapon validation.

  • Show the Creative-mode restriction explicitly.

  • Keep ownership and anti-duplication checks intact.

Fixed the misleading rejection message without weakening weapon security.

To use abilities in Creative, set protection.allow-creative: true in config.yml, then run /tw reload. Otherwise, switch to Survival.

Kodari can make mistakes. Review important code before using.
Files
companion-mod
src
test-templates
build.gradle
IMPORTANT.txt
README.md
settings.gradle
TESTING.md
Code
31 2,769
src/main/java/com/xadrox7/goatedweapons/GoatedWeapons.java
package com.xadrox7.goatedweapons;

import com.xadrox7.goatedweapons.abilities.AbilityEngine;
import com.xadrox7.goatedweapons.abilities.Combat;
import com.xadrox7.goatedweapons.commands.WeaponsCommand;
import com.xadrox7.goatedweapons.cooldowns.Cooldowns;
import com.xadrox7.goatedweapons.crafting.CraftingManager;
import com.xadrox7.goatedweapons.effects.Effects;
import com.xadrox7.goatedweapons.listeners.WeaponListener;
import com.xadrox7.goatedweapons.networking.CompanionChannel;
import com.xadrox7.goatedweapons.utils.Protection;
import com.xadrox7.goatedweapons.utils.RegionGuard;
import com.xadrox7.goatedweapons.utils.Settings;
import com.xadrox7.goatedweapons.utils.WorldGuardHook;
import com.xadrox7.goatedweapons.weapons.WeaponItems;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;

@Getter
public final class GoatedWeapons extends JavaPlugin {
    private Settings settings;
    private WeaponItems items;
    private Cooldowns cooldowns;
    private AbilityEngine engine;
    private Protection protection;
    private CraftingManager crafting;
    private CompanionChannel companion;
    private final AtomicBoolean reloading = new AtomicBoolean();

    @Override
    public void onEnable() {
        try {
            saveDefaultConfig();
            settings = new Settings(getConfig());
            items = new WeaponItems(this, settings);
            cooldowns = new Cooldowns(this);
            RegionGuard regions = Bukkit.getPluginManager().isPluginEnabled("WorldGuard") ? new WorldGuardHook(settings) : null;
            protection = new Protection(settings, regions);
            Combat combat = new Combat();
            Effects effects = new Effects(settings);
            engine = new AbilityEngine(this, settings, items, cooldowns, protection, combat, effects);
            companion = new CompanionChannel(this, settings, engine);
            engine.setCompanionChecker(companion::connected);
            crafting = new CraftingManager(this, settings, items);
            crafting.register();
            Bukkit.getPluginManager().registerEvents(combat, this);
            Bukkit.getPluginManager().registerEvents(crafting, this);
            Bukkit.getPluginManager().registerEvents(new WeaponListener(settings, items, engine, companion, protection), this);
            WeaponsCommand command = new WeaponsCommand(this);
            Objects.requireNonNull(getCommand("tw")).setExecutor(command);
            Objects.requireNonNull(getCommand("tw")).setTabCompleter(command);
            Bukkit.getOnlinePlayers().forEach(items::normalize);
            Bukkit.getConsoleSender().sendMessage(new String[]{"§b§lGOATED SMP", "§7Custom Weapons System",
                    "§8Developed by §bXadroX7", "§aGoatedWeapons enabled successfully."});
            if (regions == null) getLogger().warning("WorldGuard not installed: only configured cuboids and damage-event integrations protect regions.");
        } catch (Exception exception) {
            getLogger().log(java.util.logging.Level.SEVERE, "GoatedWeapons could not start safely", exception);
            Bukkit.getPluginManager().disablePlugin(this);
        }
    }

    @Override
    public void onDisable() {
        if (engine != null) engine.shutdown();
        if (companion != null) companion.close();
        if (crafting != null) crafting.unregister();
    }

    public void reloadSettings(CommandSender sender) {
        if (!reloading.compareAndSet(false, true)) {
            sender.sendMessage("§cA reload is already in progress.");
            return;
        }
        File file = new File(getDataFolder(), "config.yml");
        Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
            YamlConfiguration next = new YamlConfiguration();
            try {
                next.load(file);
            } catch (Exception exception) {
                if (isEnabled()) Bukkit.getScheduler().runTask(this, () -> {
                    reloading.set(false);
                    sender.sendMessage("§cInvalid config: " + exception.getMessage());
                });
                return;
            }
            if (!isEnabled()) return;
            Bukkit.getScheduler().runTask(this, () -> {
                var previous = settings.raw();
                engine.shutdown();
                settings.replace(next);
                try {
                    protection.reloadZones();
                    crafting.register();
                    sender.sendMessage("§aGoatedWeapons reloaded. Active abilities ended; cooldowns retained.");
                } catch (RuntimeException exception) {
                    settings.replace(previous);
                    protection.reloadZones();
                    crafting.register();
                    sender.sendMessage("§cReload rejected: " + exception.getMessage());
                } finally {
                    reloading.set(false);
                }
            });
        });
    }
}