nothyperboiz1

Premium crate system.

Animated opening.

Particle effects.

Sounds.

Key system.

Preview.

Weighted rewards.

Duplicate protection.

Broadcasts.

Fireworks.

Database support.

Kodari AI
KodariAug 7 at 8:42 am 4
PremiumCrateSystem
A premium crate system plugin featuring animated opening sequences with particle effects and sounds. Players use keys to open crates, with a preview GUI showing weighted rewards. Includes duplicate protection to prevent repeat rewards, global broadcast announcements on rare drops, and celebratory fireworks displays. Supports MySQL/SQLite database storage for player data, key inventories, and reward tracking. Features customizable crate types, reward tiers with configurable weights, and a user-friendly GUI framework built on the inventory system. Commands for admin crate management, key distribution, and player reward history. Fully configurable messages, particle types, sound effects, and animation styles.
  1. Create the Gradle project, plugin metadata, and default crate configuration.

  2. Add the crate, reward, key, database, animation, and GUI managers.

  3. Add commands and listeners for opening, previews, keys, effects, broadcasts, and fireworks.

  1. Created the Gradle-based PremiumCrates plugin with Spigot API, XSeries, SQLite, and Lombok support.

  2. Added configurable crates with weighted rewards, duplicate protection, persistent SQLite reward history, keys, previews, commands, broadcasts, particles, sounds, fireworks, and animated opening GUIs.

  3. Added /crates commands:

    • /crates list

    • /crates preview <crate>

    • /crates open <crate>

    • /crates givekey <player> <crate> [amount]

    • /crates reload

  4. Added default basic and legendary crate configurations in config.yml.

nothyperboiz1

Fix the Error

Kodari AI
KodariAug 7 at 9:42 am 3
  1. Trace the project’s compile/runtime failure points in the generated crate implementation.

  2. Patch the concrete compatibility and null-safety issues without changing the requested crate features.

Fixed the crate opening error:

  • /crates open <crate> now correctly requires and consumes a matching key.

  • Added the same missing-key validation used by physical crate opening.

  • Preserved key refunds when no eligible reward exists.

  • Cleaned up material fallback handling.

Use:

Plain Text
/crates givekey <player> <crate>
/crates open <crate>

The player must hold the correct crate key in their main hand.

nothyperboiz1

[09:49:16 ERROR]: Error occurred while enabling PremiumAuctionHouse v1.0.0 (Is it up to date?)

Kodari AI
KodariAug 7 at 10:33 am 1

That line is only the Bukkit error header; the actual cause is in the stack trace immediately below it.

The important issue is that your server is loading:

Plain Text
PremiumAuctionHouse v1.0.0

But this project is configured as:

YAML
name: PremiumCrates
main: com.kodari.premiumcrates.PremiumCratesPlugin

So the server is running a different or outdated JAR.

Fix it:

  1. Stop the server.

  2. Remove the old PremiumAuctionHouse*.jar from the plugins folder.

  3. Build and upload the current PremiumCrates JAR.

  4. Ensure there is only one copy of the plugin in plugins.

  5. Start the server again.

If it still fails, send the complete log starting from:

Plain Text
Caused by:

through the final exception line. The single line provided does not include the actual error.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
23 971
src/main/java/com/kodari/premiumcrates/PremiumCratesPlugin.java
package com.kodari.premiumcrates;

import com.kodari.premiumcrates.command.CrateCommand;
import com.kodari.premiumcrates.crate.CrateManager;
import com.kodari.premiumcrates.crate.KeyManager;
import com.kodari.premiumcrates.crate.RewardManager;
import com.kodari.premiumcrates.database.DatabaseManager;
import com.kodari.premiumcrates.gui.GUIListener;
import com.kodari.premiumcrates.gui.GUIManager;
import com.kodari.premiumcrates.listener.CrateListener;
import com.kodari.premiumcrates.open.AnimationManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class PremiumCratesPlugin extends JavaPlugin {
    private CrateManager crateManager;
    private KeyManager keyManager;
    private RewardManager rewardManager;
    private DatabaseManager databaseManager;
    private GUIManager guiManager;
    private AnimationManager animationManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        databaseManager = new DatabaseManager(this);
        databaseManager.initialize();
        crateManager = new CrateManager(this);
        crateManager.reload();
        keyManager = new KeyManager();
        rewardManager = new RewardManager(this, databaseManager);
        guiManager = new GUIManager();
        animationManager = new AnimationManager(this, keyManager, rewardManager, guiManager);

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new CrateListener(this), this);
        CrateCommand crateCommand = new CrateCommand(this);
        getCommand("crates").setExecutor(crateCommand);
        getCommand("crates").setTabCompleter(crateCommand);
    }

    @Override
    public void onDisable() {
        if (animationManager != null) animationManager.cancelAll();
        if (databaseManager != null) databaseManager.close();
    }

    public CrateManager getCrateManager() { return crateManager; }
    public KeyManager getKeyManager() { return keyManager; }
    public RewardManager getRewardManager() { return rewardManager; }
    public GUIManager getGuiManager() { return guiManager; }
    public AnimationManager getAnimationManager() { return animationManager; }
}