Abdul Rehman
📎 1 file 10,001 chars
📄
pasted-code-1792151989253.txt
txt 148 lines
▶
Act as a Principal Minecraft Java Plugin Developer and Senior Systems Architect specializing in Spigot/PaperMC 1.20+ high-performance multiplayer server plugins.

Please write/generate a complete, production-ready, highly optimized, memory-efficient, thread-safe, and modular Spigot/Paper plugin named "UltimateHardcorePets".

======================================================================
                         GAME DESIGN & MECHANICS
======================================================================

1. ONE-PLAYER, ONE-PET & 10 ULTRA-CUSTOM 3D WEAPONS
----------------------------------------------------------------------
- Every player on the server is permanently bound to exactly ONE unique 3D Pet (integrated via ModelEngine / ItemsAdder API hooks). Vanilla mob models are strictly disallowed.
- There are 10 distinct 3D Custom Weapons (not just swords). Each Pet is strictly linked to 1 specific Custom Weapon:
  1. Void Scythe
  2. Sun-Forged Katana
  3. Thunder God's Warhammer
  4. Leviathan Trident
  5. Dragon-Fang Battleaxe
  6. Phoenix Glaive
  7. Reaper Dagger
  8. Celestial Spell Staff
  9. Shadow Halberd
  10. Titan Greatsword

2. GOD-TIER WEAPON ABILITIES (3 ABILITIES PER WEAPON)
----------------------------------------------------------------------
Each weapon MUST feature 3 distinct, extremely overpowered abilities (1 Passive Skill, 1 Right-Click Ability, and 1 Sneak + Right-Click Ultimate Ability) that bypass Full Netherite Armor and deal massive or 1-hit kill damage:

- Void Scythe:
  • Passive (Armor Rupture): Ignores 25% of enemy Netherite armor protection.
  • Right-Click (Soul Harvest): Steals HP from all enemies within 10 blocks + inflicts Blindness & Slowness IV.
  • Sneak + Right-Click (Black Hole Domain): Summons a gravity rift pulling enemies in, exploding after 3s for an instant kill.

- Sun-Forged Katana:
  • Passive (Flash Speed): Grants Speed III + Jump Boost II while held.
  • Right-Click (Shadow Dash): Teleports 8 blocks forward, slashing through enemies for 30 True Damage.
  • Sneak + Right-Click (Solar Execution): Calls down a solar beam melting armor and inflicting Wither V.

- Thunder God's Warhammer:
  • Passive (Stun Impact): Melee hits stun enemies for 1.5s, stopping movement/attacks.
  • Right-Click (Ground Shatter): Slams the ground, launching enemies within 15 blocks 20 blocks upward.
  • Sneak + Right-Click (Lightning Apocalypse): Strikes target with 10 concurrent lightning bolts, instantly shattering full Netherite armor.

- Leviathan Trident:
  • Passive (Water Immunity): Infinite Respiration, Dolphin's Grace, & Resistance III in water/rain.
  • Right-Click (Tidal Wave): Launches a massive ice/water wave pushing enemies back and dealing Freezing Damage.
  • Sneak + Right-Click (Tsunami Cage): Encloses enemy in an ice cage that explodes in 5s.

- Dragon-Fang Battleaxe:
  • Passive (Berserk Rage): Damage increases up to 3x as player HP drops.
  • Right-Click (Decapitate Strike): Heavy armor-piercing strike that disables shields for 15s.
  • Sneak + Right-Click (Dragon's Breath): Fires a massive dragon flame ball incinerating the area.

- Phoenix Glaive:
  • Passive (Rebirth Shield): Saves player from fatal blow once every 5 minutes, restoring 100% HP with 5s Invulnerability.
  • Right-Click (Flame Tornado): Fire vortex pulling enemies inside and dealing continuous burn damage.
  • Sneak + Right-Click (Inferno Meteor): Calls down a massive meteor creating a crater and dealing instant death damage.

- Reaper Dagger:
  • Passive (Silent Backstab): Hits from behind deal 5x Critical Damage.
  • Right-Click (Shadow Step): Instantly teleports directly behind the target player.
  • Sneak + Right-Click (Soul Bleed): Inflicts deadly poison halving enemy's Max Hearts for 10s.

- Celestial Spell Staff:
  • Passive (Magic Aura): Total immunity to all projectile attacks (Arrows/Tridents).
  • Right-Click (Gravity Reversal): Inverts gravity for all enemies within 20 blocks, launching them into the sky for massive fall damage.
  • Sneak + Right-Click (Ray of Annihilation): Fires a straight-line laser piercing through terrain and Netherite armor.

- Shadow Halberd:
  • Passive (Extended Reach): Doubles melee hit reach (8 blocks distance).
  • Right-Click (Void Pull): Drags distant target player directly to the attacker + Nausea + Slowness.
  • Sneak + Right-Click (Shadow Clone Army): Summons 3 aggressive decoy clones to confuse the enemy.

- Titan Greatsword:
  • Passive (Unstoppable Force): Total immunity to all Knockback.
  • Right-Click (Shield Breaker Charge): Forward dash dealing 40 True Damage and breaking shield blocks.
  • Sneak + Right-Click (World Splitter): Sends out a massive shockwave capable of 1-shotting full Netherite players.

3. DEV / TEST SERVER OP DEBUG COMMAND (/cus)
----------------------------------------------------------------------
- Implement an OP/Admin developer debug command /cus (Permission: ultimatepets.admin or OP status).
- When an authorized player executes /cus in chat:
  1. Instantly give ALL 10 Custom Weapons directly into the player's main inventory.
  2. Spawn all 10 Custom 3D Pets directly around the executor for testing.
  3. Instantly spawn 2 Blood Moon Overlord Bosses right in front of the executor.
  4. Dynamically generate a test Shrine structure nearby and give the "Sacred Shrine Coordinates" book to the executor.
  5. Send a confirmation chat message: "&a[Test Mode] All custom weapons, pets, bosses, and shrine items have been spawned for testing!"

4. STRICT WEAPON INVENTORY RESTRICTION (NO CONTAINERS / NO STORAGE)
----------------------------------------------------------------------
- Custom Weapons CANNOT be stored anywhere other than the owner's personal Player Inventory (or Armor/Offhand slots).
- Absolutely block placing or moving Custom Weapons into:
  • Ender Chests
  • Shulker Boxes (including nested Shulker interactions)
  • Single / Double Chests, Trapped Chests, Barrels
  • Bundles, Hopper Carts, Minecarts with Chests, Donkeys/Llamas with Chests, Droppers, Dispensers, Furnaces, Anvils, Grindstones, Smithing Tables, Item Frames, Armor Stands, Chiseled Bookshelves, or ANY block entity container.
- Cancel InventoryClickEvent, InventoryDragEvent, InventoryMoveItemEvent, PlayerDropItemEvent (if intended for storage), and Hopper suction events for Custom Weapons into external inventories.
- Send an error message if attempted: "&cCustom Weapons can only be held in your personal inventory!"

5. ABSOLUTE WEAPON INDESTRUCTIBILITY PROTECTION
----------------------------------------------------------------------
- Custom Weapons must be 100% immune to ALL forms of destruction in the world:
  • Lava / Fire burn protection (Item entities do not burn).
  • Explosions (TNT, Creeper, Wither, End Crystal, Anchor, Bed explosions).
  • Void damage (If dropped into Void Y < -64, automatically teleports item safely back to world surface Y).
  • Cactus contact destruction.
  • Lightning bolts, Anvil fall damage, and despawn timers (setPersistent(true) and setUnlimitedLifetime(true) on dropped Item entities).

6. 3-DAY INACTIVITY & AUTOMATIC WEAPON REVOCATION SYSTEM
----------------------------------------------------------------------
- Track total accumulated active playtime per player using persistent SQLite / JSON storage.
- Every player holding a Custom Weapon must accumulate AT LEAST 15 minutes of active playtime within a rolling 3-day (72 hours) window.
- If a player fails to play for 15 minutes within 72 hours:
  1. Forcibly revoke the Custom Weapon and unbind the Pet.
  2. Drop the revoked Custom Weapon at the player's last known logout coordinates as a glowing dropped item entity.
  3. Send a server-wide broadcast alert announcing the exact world and X, Y, Z coordinates where the weapon was forfeited.
  4. Reset the timer as soon as any player logs in and completes 15 minutes of active play.

7. PET DEATH PUNISHMENT & DYNAMIC SHRINE SYSTEM
----------------------------------------------------------------------
- When a player's pet dies (HP reaches 0):
  1. The player's assigned Custom Weapon is immediately unequipped/deleted from their inventory and locked.
  2. Continuously broadcast player coordinates every few seconds to mark them as a hunted target.
  3. Dynamically generate a Shrine structure (Crying Obsidian base + Beacon) within 1000 blocks.
  4. Place a "Sacred Shrine Coordinates" book in the player's inventory.

8. 30-MINUTE HIGH-RISK REVIVAL RITUAL
----------------------------------------------------------------------
- Player must remain within 5 blocks of the Shrine for 30 consecutive minutes without taking damage or moving out of radius to revive their pet and unlock their weapon.

9. SCHEDULED BLOOD MOON & 1000+ CUSTOM BOSS POOL
----------------------------------------------------------------------
- Triggers on real-life Tuesday and Friday nights (server local time).
- Spawns exactly 2 overpowered bosses pulling from a pool of 1000+ randomized boss titles and lethal stat configurations.

======================================================================
                    PROJECT STRUCTURE & TECHNICAL REQUIREMENTS
======================================================================
1. Architecture (Spigot/Paper 1.20+ API):
   - Package structure: com.yourname.ultimatepets
   - Use PDC (PersistentDataContainer) with custom NamespacedKey tags to identify Custom Weapons safely across restarts.
2. Managers & Commands:
   - DevCusCommand: Handles the /cus test command execution.
   - WeaponManager: Handles PDC tagging, weapon items creation, and container restrictions.
   - PetManager: ModelEngine/ItemsAdder hooks, pet binding, death penalty hooks.
   - InactivityManager: Playtime tracking and 3-day revocation checks.
   - ShrineManager & BloodMoonManager: Shrine structures and scheduled boss spawns.
3. Listeners:
   - StorageRestrictionListener, WeaponIndestructibleListener, PlayerPlaytimeListener, AbilityListener.
Kodari AI
KodariOct 16 at 12:21 pm 5
  1. Check the existing project structure and dependencies so the plugin fits the workspace.

  2. Implement the core plugin and /cus test command.

  3. Add weapon abilities, storage/destruction protections, inactivity tracking, and shrine/boss systems.

  4. Build only the integration hooks that can work without external model assets or plugins. 3D pet and weapon models must be created in Kodari Studio and brought in through a workspace.

Added the Paper 1.20.4 plugin structure, /cus, PDC-tagged owner-bound weapons, inventory and dropped-item protections, JSON inactivity tracking, shrine revival rituals, scheduled Blood Moons, and implementations of the weapon abilities.

Custom assets are not included. Create the 3D models in Kodari Studio, bring them into the project through a workspace, then configure their ItemsAdder IDs in config.yml. Until those IDs are set, pet and boss spawning won’t work; ModelEngine integration isn’t included.

Some mechanics are approximations rather than exact Bukkit behavior: extended melee reach, armor shattering, shield disable duration, and aggressive clone AI are not implemented exactly as specified.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 1,544
src/main/java/com/yourname/ultimatepets/UltimateHardcorePets.java
package com.yourname.ultimatepets;

import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class UltimateHardcorePets extends JavaPlugin implements Listener {
    private WeaponManager weaponManager;
    private ShrineManager shrineManager;
    private PetManager petManager;
    private InactivityManager inactivityManager;
    private BloodMoonManager bloodMoonManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        weaponManager = new WeaponManager(this);
        shrineManager = new ShrineManager(this, weaponManager);
        petManager = new PetManager(this, shrineManager);
        shrineManager.setPetManager(petManager);
        inactivityManager = new InactivityManager(this, weaponManager);
        bloodMoonManager = new BloodMoonManager(this);

        Bukkit.getPluginManager().registerEvents(this, this);
        Bukkit.getPluginManager().registerEvents(shrineManager, this);
        Bukkit.getPluginManager().registerEvents(petManager, this);
        Bukkit.getPluginManager().registerEvents(inactivityManager, this);
        Bukkit.getPluginManager().registerEvents(new WeaponSafetyListener(this, weaponManager), this);
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this, weaponManager), this);

        getCommand("cus").setExecutor(new DevCusCommand(this, weaponManager, petManager, bloodMoonManager));
        inactivityManager.start();
        bloodMoonManager.start();
    }

    @Override
    public void onDisable() {
        if (inactivityManager != null) inactivityManager.save();
        if (shrineManager != null) shrineManager.save();
        if (petManager != null) petManager.save();
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        inactivityManager.onJoin(event.getPlayer());
        Bukkit.getScheduler().runTaskLater(this, () -> petManager.ensurePet(event.getPlayer()), 20L);
    }

    public WeaponManager weapons() { return weaponManager; }
    public ShrineManager shrines() { return shrineManager; }
    public PetManager pets() { return petManager; }
}