yours.nihar
📎 1 file 3,094 chars
📄
pasted-code-1783530565325.txt
txt 41 lines
▶
Act as an expert Minecraft Paper Plugin Developer. I need the complete, fully functional Java code framework for a 1.21.x custom plugin named "ChaosCore" (Made by Nihar). The plugin must now include an interactive Custom INVENTORY GUI Crafting System and server-wide toggle switches.

CRITICAL INVENTORY GUI & RECIPE REQUIREMENTS:
1. THE RECIPE MENU (/chaos recipe): 
   - Opens a custom virtual Chest INVENTORY GUI (9x5 or 9x6 slots) titled "§bChaos Core Recipe".
   - Inside the INVENTORY GUI, display a visual 3x3 crafting grid using stained glass panes as borders. The center slots will show the actual items required to craft the "Cosmic Chaos Core" (e.g., 4x Netherite Ingots, 4x Diamond Blocks, and 1x Beacon in the center).
   - Clicking the items inside the INVENTORY GUI must cancel the event so players cannot steal the display items.

2. ONE-TIME CRAFT LIMIT PER PLAYER:
   - Implement a custom shaped recipe using Bukkit.addRecipe() when the plugin loads.
   - Use a PrepareItemCraftEvent or CraftItemEvent listener. Track each player's UUID in 'data.yml'.
   - If a player tries to craft the Cosmic Chaos Core more than ONCE, cancel the craft and send a message: "§c[ChaosCore] You have reached your maximum lifetime limit of 1 craft for this item!"

3. ADMIN TOGGLE FEATURE (Enable/Disable):
   - Add a server-wide boolean toggle in 'config.yml': `crafting-enabled: true`.
   - Add an admin command: `/chaos togglecraft`. This switches the boolean state instantly.
   - If crafting-enabled is set to false, instantly unregister the recipe or block any attempt to craft it, sending a message: "§c[ChaosCore] Crafting for the Cosmic Chaos Core is currently disabled by an admin!"

---

### 🛠️ UPDATED COMMANDS & PERMISSIONS (Made by Nihar):
- `/chaos recipe` -> Opens the visual recipe INVENTORY GUI for any player. (Permission: `chaoscore.player.recipe`)
- `/chaos togglecraft` -> Toggles the global ability to craft the core. (Permission: `chaoscore.admin.toggle`)
- `/chaos give ` -> Gives the custom item (Standard admin bypass).
- `/chaos setclass  ` -> Sets class and updates lore.

---

### 🎭 THE 8 COSMIC CLASSES & LORE FORMAT:
Keep all 8 classes from the previous framework (Chrono-Warper, Singularity Void, Voodoo Shaman, Shape-Shifter, Techno-Alchemist, Abyssal Phantom, Nebula Cosmic, Ragnarok Titan) functional with:
- NO TARGET REQUIRED directional/ray-trace physics.
- Dynamic Action Bar HUD displaying class, remaining mana, and cooldowns.
- Mandatory branding: "§7[§bChaosCore §7| §aMade by Nihar§7]" on all items and menus.

---

### TECHNICAL COMPLIANCE:
- Use Asynchronous BukkitRunnables for heavy visual effects (falling blocks, vectors, custom 1.21 particles) to maintain 20 TPS.
- Save the player's craft counts and active classes safely using player UUIDs in `data.yml`.

Please provide the updated Paper 1.21+ Java project code, specifically focusing on the InventoryClickEvent for the INVENTORY GUI, the CraftItemEvent handling the 1-time limit and admin toggle, and the command executors.
Kodari AI
KodariJul 8 at 5:10 pm 1

The generation was stopped before any content could be produced.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code