Act as a Senior Minecraft Java Plugin Developer specializing in high-performance Paper/Spigot plugins (Target: 1.21+). Develop a complete, production-ready, heavily optimized plugin called "GemboundOrigins". The plugin must compile directly into a working .jar file.
This is a premium "Gem-based Hardcore PvP/Survival" plugin. Below is the comprehensive technical specification. Follow every detail strictly.
1. SYSTEM BASE ITEM & RESTRICTIONS
- Every single power item in this plugin MUST be a Minecraft Echo Shard (Material:
ECHO_SHARD). - The item must use PersistentDataContainers (PDC) to lock its identity securely to prevent NBT wiping.
- ANTI-ABUSE RESTRICTIONS:
* Cancel PlayerDropItemEvent if the item is a Gem. * Cancel InventoryClickEvent if the player attempts to move the Gem into any container (Chests, Ender Chests, Shulker Boxes, Hoppers, Item Frames, Donkeys, etc.). It can only exist in the player's hotbar or inventory. * Cancel PlayerDeathEvent from dropping the Gem. The player keeps it on death. * Cancel BlockPlaceEvent or any accidental usage.
2. THE SCREEN ROLLING AWAKENING (First Join)
- When a player joins for the very first time, completely freeze them (
PlayerMoveEvent cancelled). - Run a 10-second (200 ticks) scheduler that mimics a slot-machine rolling animation on their screen.
- Every 2 ticks, randomly display a Gem Name in the center of their screen using
Title and Subtitle formats with color codes (e.g., Title: "§b§lROLLING...", Subtitle: "§e§lGem of Inferno"). - Play a rapid tick sound (
BLOCK_NOTE_BLOCK_PLING, volume 0.5, pitch 1.5) on every roll change. - At exactly 10 seconds, stop the roll, select the final Gem, display a massive title (e.g., "§a§lUNLOCKED §6§lGem of Inferno"), play the
ITEM_TOTEM_USE sound, and flash a massive burst of custom particles (e.g., Spherical explosion of TOTEM and SPELL_WITCH particles). Unfreeze the player and give them the designated Echo Shard Gem.
3. THE ACTION BAR SYSTEM (Real-time HUD)
- Run an asynchronous repeating task every 10 ticks (0.5 seconds) to update every player's Action Bar.
- The format must be exactly:
"§a§lGEM: §b%gem_name% §7| §e§lLvl: §6%level% §7| §c§lLives: §4%lives%/10 §7| §d§lEnergy: §b%energy_bottles%"
- %lives% is calculated as (10 - current_deaths).
- %energy_bottles% counts how many custom Energy Bottles are currently in the player's inventory.
4. DEATH PENALTY, ENERGY BOTTLES & BREAKING MECHANICS
- Each time a player dies, they lose 1 Life. Their death counter increments by 1.
- On death, the player drops 1 physical custom item: "Energy Bottle" (Material:
POTION, glowing with custom NBT/PDC tags). - If a player's deaths count is greater than 0, they suffer from "Gem Weakness". Every time they use a Gem ability, they have a 50% chance to be afflicted with Slowness II and Weakness I for 5 seconds.
- Players can drink/consume the Energy Bottle (or execute
/gems drink) to reduce their death counter by 1, restoring their Gem strength. - When a player reaches 10 deaths, their Gem status changes to "BROKEN".
* All Passive and Active abilities are completely disabled. * The Echo Shard item name changes to grey with a "§7§l[BROKEN]" prefix. * To fix it, they must hold the item and use /gems repair, which consumes exactly 25 Energy Bottles from their inventory.
5. ULTRA-PREMIUM ECHO SHARD ITEM LORE FORMAT
When a Gem is generated or updated, its item display must follow this exact format:
Display Name: §b§l[GEM] §6§lGem of <Name> Lore: §7------------------------------------ §eOwner: §f%player_name% §eLevel: §a%level% §7(§b%kills%§7/§b%next_level_kills% Kills) §eStatus: %status_color%%status% §7------------------------------------ §6[PASSIVE ABILITY] §7%passive_description% §7------------------------------------ §d[SHIFT + LEFT-CLICK ACTIVE] §7%shift_left_description% §7Cooldown: §c%sl_cooldown%s §7------------------------------------ §b[SHIFT + RIGHT-CLICK ACTIVE] §7%shift_right_description% §7Cooldown: §c%sr_cooldown%s §7------------------------------------ §4§l⚠ UNDROPPABLE & UNSTOREABLE ⚠
6. THE 15 GEMS & ABILITY MATRIX (5 Levels Scaling)
(Every level up increases damage/durations by 20% and reduces cooldowns by 15%. Level 2 requires 12 kills, Lvl 3: 25 kills, Lvl 4: 40 kills, Lvl 5: 60 kills).
[Category 1: Elemental Gems]
- Gem of Inferno
- Passive: Permanent Fire Resistance. - Shift+Left: Launches a piercing Fireball that ignites enemies in a 4-block radius. - Shift+Right: Spawns a ring of fire (FLAME particles) around the player, burning anyone who gets close for 6s.
- Gem of Glacial
- Passive: Frost Walker effect on water and permanent Dolphins Grace. - Shift+Left: Throws an ice shard; damages and applies Slowness IV to the hit target for 4s. - Shift+Right: Creates a 5x5 temporary ice cage around the nearest enemy for 5s.
- Gem of Tempest
- Passive: Fall damage immunity. - Shift+Left: Launches the player 12 blocks forward/upward in the direction they look (Wind Dash). - Shift+Right: Releases a massive shockwave (CLOUD particles) knocking back all entities within 6 blocks.
- Gem of Gaia
- Passive: Saturation/Auto-feed while standing under direct sunlight. - Shift+Left: Instantly spawns a temporary 3x3 wall of Obsidian in front of the player (disappears after 6s). - Shift+Right: Earth Slam - Knocks up all nearby entities and inflicts Nausea for 5s.
[Category 2: Shadow Gems]
- Gem of Nightstalker
- Passive: Speed I and Night Vision while inside dark areas or during night time. - Shift+Left: Invisibility for 6 seconds; leaves behind dark smoke footprint particles. - Shift+Right: Blindness spell thrown at a target player for 4 seconds.
- Gem of Phantom
- Passive: Takes 25% less damage from projectiles (Arrows, Tridents). - Shift+Left: Phase Shift - Teleports 8 blocks forward cleanly, even through solid walls. - Shift+Right: Spawns 3 phantom clones (decoy armor stands with player's skull) to confuse enemies for 5s.
- Gem of Venom
- Passive: Melee attacks have a 15% chance to inflict Poison I for 4 seconds. - Shift+Left: Throws a splash AoE lingering potion cloud that poisons everyone inside it. - Shift+Right: Toxic Shield - Anyone who hits the player for the next 5s gets Poison II.
- GEM OF THE VOID MONARCH [SUPREME TIER 1]
- Passive: Every time an enemy hits the player, the player heals 1 HP (0.5 Heart), with a 4s internal cooldown. - Shift+Left: Void Grip - Pulls all entities within a 10-block radius directly to the player and freezes them for 2s. - Shift+Right: Void Domain - Spawns a 10-block radius circle of black particles. Inside, the Monarch gets Strength II and Speed II, while all enemies are Blinded, Withered, and cannot sprint. Lasts 8 seconds.
[Category 3: Blood Gems]
- Gem of Bloodhunter
- Passive: Grants permanent Glowing outlines on any player within 25 blocks who is below 35% HP. - Shift+Left: Launches a Blood Hook; pulls the targeted enemy directly to the player. - Shift+Right: Scent of Blood - Gains Speed III and Strength I for 6 seconds if an injured player is nearby.
- Gem of Plaguebringer
- Passive: Complete immunity to all negative potion status effects. - Shift+Left: Life Drain - Instantly steals 3 hearts from a targeted player and heals the user. - Shift+Right: Contagion - Spawns an epidemic aura. Any player within 5 blocks begins spreading Wither I to their teammates.
- Gem of Bonecrusher
- Passive: Permanent Resistance I status effect. - Shift+Left: Skull Cracker - Next melee hit deals 2x critical damage and inflicts Slowness III. - Shift+Right: Ground Rupture - Slams the ground, launching massive block particles, dealing heavy damage, and breaking shields of nearby players.
- GEM OF THE BLOOD GOD [SUPREME TIER 2]
- Passive: 30% of all melee damage dealt to players/mobs is instantly returned to the user as health. - Shift+Left: Execution - If an enemy is below 20% HP, instantly execute them with a blood blast particle effect. - Shift+Right: Blood Rage - For 8 seconds, the user's max health drops to 2 hearts, but they gain total Knockback Immunity, Speed IV, Strength III, and their melee attacks bypass all armor protections.
[Category 4: Celestial Gems]
- Gem of Sunblade
- Passive: All melee attacks set enemies on fire for 4 seconds. - Shift+Left: Solar Beam - Strikes a precise beam of light (Lightning strike effect without real fire block damage) dealing heavy true damage to the target location. - Shift+Right: Daybreak - Emits a blinding flash, blinding all players looking at the user within a 15-block radius for 4s.
- Gem of Starfall
- Passive: Permanent Haste I and Night Vision. - Shift+Left: Astral Arrow - Shoots a homing projectile made of star particles that locks onto the nearest player. - Shift+Right: Meteor Shower - Calls down 5 exploding fireworks at the targeted area, dealing massive AoE damage to enemies.
- GEM OF THE ASTRAL WARDEN [SUPREME TIER 3]
- Passive: Astral Shield - A permanent spinning orbit particle around the player that completely blocks/negates 1 fatal, game-ending blow. Cooldown: 10 minutes. - Shift+Left: Dimension Shift - Becomes entirely invulnerable, intangible, and unable to attack or be attacked for 5 seconds (Astral Form). - Shift+Right: Chrono Stasis (Time Freeze) - Rigidly freezes all players, projectiles, and entities within a 15-block radius for 4 seconds. Frozen players cannot move, look around, or use chat/commands.
7. COMPLETE COMMAND MATRIX (22 REQUIRED COMMANDS)
Implement exactly these commands with proper permission nodes (gembound.player and gembound.admin).
PLAYER COMMANDS:
/gems help - Displays a beautifully formatted help menu of player commands./gems info - Shows detailed mechanical explanations of the player's current Gem./gems stats - Displays active Gem name, current level, current kills, death count, and broken status./gems aura - Toggles the continuous visual particle aura on/off./gems repair - Repairs a broken Gem if the player holds it and possesses 25 Energy Bottles./gems drink - Consumes 1 Energy Bottle from inventory to clear 1 death penalty point./gems top - Displays a INVENTORY GUI or chat leaderboard ranking top players by Gem levels and kills./gems menu - Opens an interactive inventory INVENTORY GUI showing all 15 available gems, descriptions, and user progress./gems particles - Opens a INVENTORY GUI allowing players to change the shape of their active aura (Circle, Spiral, Helix)./gems bind - Re-syncs and places the Gem back into Hotbar Slot 1 if it somehow gets displaced./gems tutorial (Alias: /tutorial) - Opens a sleek, interactive multi-page virtual Book or a 27-slot INVENTORY GUI named "§8§lServer Mechanics Tutorial". This tutorial visually guides new players through the server features step-by-step.
- Page/Item 1 (The Gems): Explains that powers are bound to Echo Shards, undroppable, and how to use Shift+Left/Right clicks. - Page/Item 2 (Lives & Deaths): Explains the 10-life system, the death penalty (Gem Weakness), and how Energy Bottles drop. - Page/Item 3 (Leveling Up): Details the 5-level scaling system and how getting player kills reduces cooldowns and increases power. - Page/Item 4 (Broken Gems & Repairing): Explains what happens at 0 lives and how to use 25 Energy Bottles to repair the Gem. - Page/Item 5 (Commands): Lists all essential player commands like /gems info, /gems stats, and /gems aura.
ADMIN COMMANDS:
/gadmin help - Shows all admin commands./gadmin give <player> <gem_id> - Forces a specific Gem onto a player, wiping their previous Gem data./gadmin setlevel <player> <1-5> - Forcefully changes a player's active Gem level./gadmin setkills <player> <amount> - Modifies a player's current kill progress./gadmin reset <player> - Clears all Gem data, kills, and deaths from a player, forcing a reroll on next join./gadmin givebottle <player> <amount> - Spawns a designated amount of official custom Energy Bottles into a player's inventory./gadmin roll <player> - Forcefully triggers the 10-second screen rolling animation for a specific player./gadmin setdeaths <player> <amount> - Instantly updates a player's internal death count./gadmin fix <player> - Instantly repairs a player's broken gem for free./gadmin break <player> - Instantly forces a player's gem into a BROKEN state./gadmin toggleaura <player> - Forcefully enables or disables a specific player's particle aura./gadmin reload - Completely reloads the plugin's config.yml.
8. SYSTEM CONFIGURATION & SOUNDS
- All values (cooldowns, damage, levels, drop rates, particle counts, title text, and sound types) must be completely modular and editable within a generated
config.yml. - Every active capability trigger MUST play custom pitch-perfect sounds (
ENTITY_ZOMBIE_VILLAGER_CONVERTED, ENTITY_ENDER_DRAGON_GROWL, etc.) and render distinct geometric particle patterns (circles, helixes, paths) using asynchronous runnable patterns to prevent main-thread server lag. - Implement strict IP/UUID verification checks inside
PlayerDeathEvent to completely eliminate "Alt-Account Kill Farming" for energy bottles or level-up stats.
Generate the optimized, leak-free, clean Java source code structure and compile it seamlessly into a ready-to-use .jar file.