zuer169
📎 1 file 8,975 chars
📄
pasted-code-1772367902745.txt
txt 154 lines
▶
Create a high-performance Minecraft Spigot/Paper plugin (1.21+) called "SpringShop".

GOAL:
Create a beautiful, aesthetic, and highly functional Spring 2026 Seasonal Event Shop plugin with a custom INVENTORY GUI, one-time purchase limit logic, daily limits, custom items with **Advanced Custom Abilities**, cosmetic particle events, and an integrated economy hook.

==============================
CORE SYSTEM REQUIREMENTS
==============================
• Hook into CoinsEngine for the primary currency ("Petals").
• Hook into PlaceholderAPI for currency display (%coinsengine_balance_raw_petals%).
• Hook into LuckPerms to check or set one-time purchase permissions (e.g., spring.bought.).
• Modular item processing system to handle different types of purchases (commands, items, permissions).
• Advanced Item Ability Manager (must listen to interact, block break, entity damage, armor equip, and projectile hit events to trigger the custom item abilities).
• Clean package structure and async-safe database saving.
• No UI lag or memory leaks; use modern Java and minimize repeating tasks.
• Support 100+ concurrent players.

==============================
SHOP ITEMS TO IMPLEMENT (WITH ABILITIES)
==============================
Each item should use the specified rich aesthetics and color scheme. Abilities must be listed in the item lore.

1) Keys & Currency:
- Spring Key: Daily limit of 5. Cost: 500 Petals. Opens "Spring Crate" at spawn (executes command: /excellentcrates key give  spring 1).
- Shards (100x & 500x): Unlimited. Cost: 200 / 900 Petals. Gives secondary currency (executes: /pp give  ).

2) Utility Tools (One-time purchases):
- Sell Wand (7 Day) & (30 Day): Cost: 1,200 / 4,000 Petals. Right-click chest to instant sell. (executes: /vs sellwand give  7d/30d).
- Lucky Blossom Hoe: Cost: 2,500 Petals. Diamond Hoe with Fortune 8, Efficiency 8, Unbreaking 5. 
  **ABILITY (Bountiful Harvest)**: Right-clicking a fully grown crop automatically harvests and replants all crops in a 5x5 radius.
- Spring Fishing Rod: Cost: 2,000 Petals. Fishing Rod with Luck of the Sea 8, Lure 5, Unbreaking 5. 
  **ABILITY (Floral Bounty)**: 5% chance when fishing to catch a "Spring Treasure", which directly deposits 10-50 Petals into their balance with a success sound.
- Spring Drill: Cost: 4,000 Petals. Diamond Pickaxe with Efficiency 8, Fortune 5, Unbreaking 5.
  **ABILITY (Tectonic Root)**: Right-click the air to toggle "3x3 Mining Mode" on/off. When on, consumes more durability but mines a 3x3 radius.

3) Weapons & Armor (One-time purchases):
- Spring Helmet: Cost: 2,000 Petals. Iron Helmet with Protection 8, Unbreaking 5, Respiration 3, Aqua Affinity 1.
  **ABILITY (Photosynthesis)**: Slowly restores hunger and saturation automatically while the player is standing in direct sunlight.
- Spring Chestplate: Cost: 3,500 Petals. Iron Chestplate with Protection 8, Thorns 3, Unbreaking 5.
  **ABILITY (Petal Shield)**: 10% chance when taking damage to unleash a burst of pink cherry particles that heavily knock back nearby enemies.
- Spring Leggings: Cost: 3,000 Petals. Iron Leggings with Protection 8, Unbreaking 5.
  **ABILITY (Spring Breeze)**: Grants permanent Speed I to the player as long as these are equipped.
- Spring Boots: Cost: 2,000 Petals. Golden Boots with Protection 8, Unbreaking 10, Feather Falling 8, Depth Strider 3.
  **ABILITY (Soft Landing)**: Taking fall damage negates the damage and instead converts it into an AoE healing burst (Regeneration II) for the player and nearby allies.
- Spring Blade: Cost: 3,500 Petals. Iron Sword with Sharpness 8, Looting 5, Fire Aspect 2, Sweeping Edge 3, Unbreaking 5.
  **ABILITY (Blossom Dash)**: Right-click to dash forward 6 blocks instantly, leaving a trail of pink particles. Cooldown: 15 seconds.
- Blossom Bow: Cost: 3,000 Petals. Bow with Power 8, Punch 3, Infinity, Unbreaking 5. 
  **ABILITY (Petal Rain)**: Left-click the air to instantly fire a spread-shot of 3 arrows. Cooldown: 8 seconds. All arrows leave a pink cherry_leaves particle trail and play a firework blast sound on impact.

4) Interactables & Cosmetics:
- Spring Rockets x16: Re-purchasable. Cost: 500 Petals. Custom pink and green burst firework.
- Petal Grenade x5: Re-purchasable. Cost: 1,000 Petals. Egg that spawns a burst of cherry_leaves particles. 
  **ABILITY (Flash Bloom)**: On impact, it gives Slowness II and Blindness to all caught enemies/players in a 4-block radius for 4 seconds.
- Blossom Banner: One-time. Cost: 500 Petals. Pink banner decoration for claims.
- Tags (Blossom, Gardener, Butterfly): One-time. Cost: 500-1,000 Petals. Runs /aloha tags give  .
- Chat Colors (Cherry Pink, Leaf Green, Lavender): One-time. Runs /lp user  permission set chatcolor.color..

==============================
COMMANDS (REQUIRED)
==============================
/springshop
- Opens the 54-slot INVENTORY INVENTORY GUI main shop menu.

/springadmin give 
- Bypasses shop logic to give items directly to the admin/player.

/springadmin reset  
- Resets a player's one-time purchase limit for a specific item.

/springadmin resetkeys 
- Resets the player's 5/5 daily key tracker.

/springdebug 
- Easy testing commands to give lots of petals, clear all personal limits, or give all items at once.

==============================
PERMISSIONS
==============================
spring.shop.use (Default to open the shop menu)
spring.admin (For all /springadmin and /springdebug commands)
spring.bought. (To be applied when a user buys a one-time item to track ownership)

==============================
DATA STORAGE
==============================
• YAML player data file OR SQLite option
• Store:
- Daily purchase trackers (e.g., number of keys bought today per UUID)
- Item Ability cooldown timers (to prevent logging out and resetting cooldowns).
• Auto-save on change and midnight daily reset for daily limits.
• Note: One-time purchases are mainly stored via LuckPerms, but the plugin should verify this logic.

==============================
CONFIG FILE
==============================
config.yml must include:
- INVENTORY GUI background items, title, and layout slots.
- Price configuration of every item.
- Toggle or configure the max daily limit (e.g., 5 for keys).
- Ability cooldown adjustments (e.g., dash cooldown, spread-shot cooldown).
- Sound effects for purchasing, denying, or equipping.

==============================
INVENTORY INVENTORY GUI SYSTEM
==============================
• 54-slot INVENTORY INVENTORY GUI using Bukkit modern inventory API.
• Clean aesthetic utilizing border panes.
• Checked dynamically against PlaceholderAPI balances.
• Locked/Sold-out items should change material (e.g., to Barrier) or add generic "SOLD OUT" lore when the player has the `spring.bought` permission.
• Unlocked/Available items show detailed story-driven lore, ABILITY descriptions, and pricing.
• Click to instantly purchase.

==============================
COLOR REQUIREMENTS & AESTHETICS
==============================
Must tightly adhere to this color palette using Hex format parsing (#RRGGBB):
- Red: #FB0000 (Use for errors, denial messages, sold out, lacks funds)
- Green: #0CFBC9 (Use for success messages, unlocked indicators)
- Blue: #029AFB 
- Pink: #FB11B3 (Use for Spring theme highlights, titles, cherry blossoms)
- Orange: #FF6011
- Yellow: #FFF133
- Grey/Purple: #928290 (CRITICAL: Highly recommended for unnecessary info, ability descriptions, deep lore, and background aesthetics. Use SMALL CAPS font heavily alongside this color).

==============================
PERFORMANCE RULES
==============================
• Do NOT use heavy repeating tasks for checking items (except for the 3x3 Drill logic which must use async chunk checks if possible).
• Projectile events (Petal Grenade, Blossom Bow) must be highly optimized and async where possible to prevent particle-lag.
• Use caching for player balances dynamically until purchase.

==============================
BONUS SYSTEM
==============================
• Title and Subtitle floating feedback upon a successful purchase.
• Custom sounds on successful purchase (ENTITY_PLAYER_LEVELUP) and denial (ENTITY_VILLAGER_NO).
• Include a direct link item in the bottom row of the INVENTORY GUI to close the menu and run `/flowerrates`.

==============================
OUTPUT
==============================
Provide:
- Main plugin class
- All item abilities logic and listeners (Grenade hits, Bow trails, 3x3 mining, Dash, etc.)
- Command executor & Tab completers
- INVENTORY INVENTORY GUI manager
- Data manager (for daily key limits & cooldowns)
- config.yml
- plugin.yml
Code must compile cleanly.
Use modern Java conventions.
No deprecated methods.
Well-commented code.
zuer169
📎 1 file 8,975 chars
📄
pasted-code-1772367949649.txt
txt 154 lines
▶
Create a high-performance Minecraft Spigot/Paper plugin (1.21+) called "SpringShop".

GOAL:
Create a beautiful, aesthetic, and highly functional Spring 2026 Seasonal Event Shop plugin with a custom INVENTORY GUI, one-time purchase limit logic, daily limits, custom items with **Advanced Custom Abilities**, cosmetic particle events, and an integrated economy hook.

==============================
CORE SYSTEM REQUIREMENTS
==============================
• Hook into CoinsEngine for the primary currency ("Petals").
• Hook into PlaceholderAPI for currency display (%coinsengine_balance_raw_petals%).
• Hook into LuckPerms to check or set one-time purchase permissions (e.g., spring.bought.).
• Modular item processing system to handle different types of purchases (commands, items, permissions).
• Advanced Item Ability Manager (must listen to interact, block break, entity damage, armor equip, and projectile hit events to trigger the custom item abilities).
• Clean package structure and async-safe database saving.
• No UI lag or memory leaks; use modern Java and minimize repeating tasks.
• Support 100+ concurrent players.

==============================
SHOP ITEMS TO IMPLEMENT (WITH ABILITIES)
==============================
Each item should use the specified rich aesthetics and color scheme. Abilities must be listed in the item lore.

1) Keys & Currency:
- Spring Key: Daily limit of 5. Cost: 500 Petals. Opens "Spring Crate" at spawn (executes command: /excellentcrates key give  spring 1).
- Shards (100x & 500x): Unlimited. Cost: 200 / 900 Petals. Gives secondary currency (executes: /pp give  ).

2) Utility Tools (One-time purchases):
- Sell Wand (7 Day) & (30 Day): Cost: 1,200 / 4,000 Petals. Right-click chest to instant sell. (executes: /vs sellwand give  7d/30d).
- Lucky Blossom Hoe: Cost: 2,500 Petals. Diamond Hoe with Fortune 8, Efficiency 8, Unbreaking 5. 
  **ABILITY (Bountiful Harvest)**: Right-clicking a fully grown crop automatically harvests and replants all crops in a 5x5 radius.
- Spring Fishing Rod: Cost: 2,000 Petals. Fishing Rod with Luck of the Sea 8, Lure 5, Unbreaking 5. 
  **ABILITY (Floral Bounty)**: 5% chance when fishing to catch a "Spring Treasure", which directly deposits 10-50 Petals into their balance with a success sound.
- Spring Drill: Cost: 4,000 Petals. Diamond Pickaxe with Efficiency 8, Fortune 5, Unbreaking 5.
  **ABILITY (Tectonic Root)**: Right-click the air to toggle "3x3 Mining Mode" on/off. When on, consumes more durability but mines a 3x3 radius.

3) Weapons & Armor (One-time purchases):
- Spring Helmet: Cost: 2,000 Petals. Iron Helmet with Protection 8, Unbreaking 5, Respiration 3, Aqua Affinity 1.
  **ABILITY (Photosynthesis)**: Slowly restores hunger and saturation automatically while the player is standing in direct sunlight.
- Spring Chestplate: Cost: 3,500 Petals. Iron Chestplate with Protection 8, Thorns 3, Unbreaking 5.
  **ABILITY (Petal Shield)**: 10% chance when taking damage to unleash a burst of pink cherry particles that heavily knock back nearby enemies.
- Spring Leggings: Cost: 3,000 Petals. Iron Leggings with Protection 8, Unbreaking 5.
  **ABILITY (Spring Breeze)**: Grants permanent Speed I to the player as long as these are equipped.
- Spring Boots: Cost: 2,000 Petals. Golden Boots with Protection 8, Unbreaking 10, Feather Falling 8, Depth Strider 3.
  **ABILITY (Soft Landing)**: Taking fall damage negates the damage and instead converts it into an AoE healing burst (Regeneration II) for the player and nearby allies.
- Spring Blade: Cost: 3,500 Petals. Iron Sword with Sharpness 8, Looting 5, Fire Aspect 2, Sweeping Edge 3, Unbreaking 5.
  **ABILITY (Blossom Dash)**: Right-click to dash forward 6 blocks instantly, leaving a trail of pink particles. Cooldown: 15 seconds.
- Blossom Bow: Cost: 3,000 Petals. Bow with Power 8, Punch 3, Infinity, Unbreaking 5. 
  **ABILITY (Petal Rain)**: Left-click the air to instantly fire a spread-shot of 3 arrows. Cooldown: 8 seconds. All arrows leave a pink cherry_leaves particle trail and play a firework blast sound on impact.

4) Interactables & Cosmetics:
- Spring Rockets x16: Re-purchasable. Cost: 500 Petals. Custom pink and green burst firework.
- Petal Grenade x5: Re-purchasable. Cost: 1,000 Petals. Egg that spawns a burst of cherry_leaves particles. 
  **ABILITY (Flash Bloom)**: On impact, it gives Slowness II and Blindness to all caught enemies/players in a 4-block radius for 4 seconds.
- Blossom Banner: One-time. Cost: 500 Petals. Pink banner decoration for claims.
- Tags (Blossom, Gardener, Butterfly): One-time. Cost: 500-1,000 Petals. Runs /aloha tags give  .
- Chat Colors (Cherry Pink, Leaf Green, Lavender): One-time. Runs /lp user  permission set chatcolor.color..

==============================
COMMANDS (REQUIRED)
==============================
/springshop
- Opens the 54-slot INVENTORY INVENTORY GUI main shop menu.

/springadmin give 
- Bypasses shop logic to give items directly to the admin/player.

/springadmin reset  
- Resets a player's one-time purchase limit for a specific item.

/springadmin resetkeys 
- Resets the player's 5/5 daily key tracker.

/springdebug 
- Easy testing commands to give lots of petals, clear all personal limits, or give all items at once.

==============================
PERMISSIONS
==============================
spring.shop.use (Default to open the shop menu)
spring.admin (For all /springadmin and /springdebug commands)
spring.bought. (To be applied when a user buys a one-time item to track ownership)

==============================
DATA STORAGE
==============================
• YAML player data file OR SQLite option
• Store:
- Daily purchase trackers (e.g., number of keys bought today per UUID)
- Item Ability cooldown timers (to prevent logging out and resetting cooldowns).
• Auto-save on change and midnight daily reset for daily limits.
• Note: One-time purchases are mainly stored via LuckPerms, but the plugin should verify this logic.

==============================
CONFIG FILE
==============================
config.yml must include:
- INVENTORY GUI background items, title, and layout slots.
- Price configuration of every item.
- Toggle or configure the max daily limit (e.g., 5 for keys).
- Ability cooldown adjustments (e.g., dash cooldown, spread-shot cooldown).
- Sound effects for purchasing, denying, or equipping.

==============================
INVENTORY INVENTORY GUI SYSTEM
==============================
• 54-slot INVENTORY INVENTORY GUI using Bukkit modern inventory API.
• Clean aesthetic utilizing border panes.
• Checked dynamically against PlaceholderAPI balances.
• Locked/Sold-out items should change material (e.g., to Barrier) or add generic "SOLD OUT" lore when the player has the `spring.bought` permission.
• Unlocked/Available items show detailed story-driven lore, ABILITY descriptions, and pricing.
• Click to instantly purchase.

==============================
COLOR REQUIREMENTS & AESTHETICS
==============================
Must tightly adhere to this color palette using Hex format parsing (#RRGGBB):
- Red: #FB0000 (Use for errors, denial messages, sold out, lacks funds)
- Green: #0CFBC9 (Use for success messages, unlocked indicators)
- Blue: #029AFB 
- Pink: #FB11B3 (Use for Spring theme highlights, titles, cherry blossoms)
- Orange: #FF6011
- Yellow: #FFF133
- Grey/Purple: #928290 (CRITICAL: Highly recommended for unnecessary info, ability descriptions, deep lore, and background aesthetics. Use SMALL CAPS font heavily alongside this color).

==============================
PERFORMANCE RULES
==============================
• Do NOT use heavy repeating tasks for checking items (except for the 3x3 Drill logic which must use async chunk checks if possible).
• Projectile events (Petal Grenade, Blossom Bow) must be highly optimized and async where possible to prevent particle-lag.
• Use caching for player balances dynamically until purchase.

==============================
BONUS SYSTEM
==============================
• Title and Subtitle floating feedback upon a successful purchase.
• Custom sounds on successful purchase (ENTITY_PLAYER_LEVELUP) and denial (ENTITY_VILLAGER_NO).
• Include a direct link item in the bottom row of the INVENTORY GUI to close the menu and run `/flowerrates`.

==============================
OUTPUT
==============================
Provide:
- Main plugin class
- All item abilities logic and listeners (Grenade hits, Bow trails, 3x3 mining, Dash, etc.)
- Command executor & Tab completers
- INVENTORY INVENTORY GUI manager
- Data manager (for daily key limits & cooldowns)
- config.yml
- plugin.yml
Code must compile cleanly.
Use modern Java conventions.
No deprecated methods.
Well-commented code.
Kodari AI
KodariMar 1 at 12:40 pm 29,289 (v2)

I’ll create a comprehensive Spring-themed shop plugin with custom abilities, GUI system, and economy integration.

SpringShop
A seasonal Spring 2026 event shop plugin featuring a beautiful 54-slot GUI, custom item abilities (harvest automation, 3x3 mining, dash attacks, spread shots), economy integration with CoinsEngine, LuckPerms purchase tracking, daily limits, and particle effects. Includes unique weapons, tools, and armor with special abilities like photosynthesis healing, petal shields, and soft landing. Supports 100+ concurrent players with optimized async operations.

Analysis

  • Spring-themed shop with 54-slot GUI using inventory framework

  • 17+ custom items with unique abilities requiring event listeners

  • CoinsEngine + PlaceholderAPI + LuckPerms integration

  • Daily limits, one-time purchases, cooldown tracking

  • Particle effects, sounds, and optimized performance for 100+ players

Due to character limits, I’ll continue with the remaining files in the next response.

zuer169

Continue

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
22 2,237
src/main/java/com/springshop/SpringShop.java
package com.springshop;

import com.springshop.commands.SpringAdminCommand;
import com.springshop.commands.SpringDebugCommand;
import com.springshop.commands.SpringShopCommand;
import com.springshop.data.DataManager;
import com.springshop.inventory.gui.GUIListener;
import com.springshop.inventory.gui.GUIManager;
import com.springshop.items.ItemManager;
import com.springshop.items.abilities.AbilityListener;
import com.springshop.items.abilities.AbilityManager;
import com.springshop.shop.ShopManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SpringShop extends JavaPlugin {
    private GUIManager guiManager;
    private DataManager dataManager;
    private ItemManager itemManager;
    private AbilityManager abilityManager;
    private ShopManager shopManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        if (!checkDependencies()) {
            getLogger().severe("Missing required dependencies! Disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        this.guiManager = new GUIManager();
        this.dataManager = new DataManager(this);
        this.abilityManager = new AbilityManager(this);
        this.itemManager = new ItemManager(this);
        this.shopManager = new ShopManager(this);
        
        registerCommands();
        registerListeners();
        
        this.dataManager.startDailyResetTask();
        
        getLogger().info("SpringShop has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.dataManager != null) {
            this.dataManager.saveAllData();
        }
        getLogger().info("SpringShop has been disabled!");
    }
    
    private boolean checkDependencies() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") == null) {
            getLogger().severe("PlaceholderAPI not found!");
            return false;
        }
        if (Bukkit.getPluginManager().getPlugin("LuckPerms") == null) {
            getLogger().severe("LuckPerms not found!");
            return false;
        }
        if (Bukkit.getPluginManager().getPlugin("CoinsEngine") == null) {
            getLogger().severe("CoinsEngine not found!");
            return false;
        }
        return true;
    }
    
    private void registerCommands() {
        getCommand("springshop").setExecutor(new SpringShopCommand(this));
        getCommand("springadmin").setExecutor(new SpringAdminCommand(this));
        getCommand("springdebug").setExecutor(new SpringDebugCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);
    }
}