mattheuss185

Crie o melhor plugin de caixa vcrates

Kodari AI
KodariSep 9 at 10:47 am 11
VaultCrates
VaultCrates is a comprehensive crate system plugin for Minecraft that allows server administrators to create customizable loot crates with weighted reward tables. Players can open crates using physical keys, virtual keys, or in-game currency, receiving random rewards from configured pools. The plugin features a full GUI menu system for browsing available crates, viewing reward chances, and managing player inventories. Administrators can create unlimited crate types with custom names, descriptions, colors, and reward items including weapons, armor, potions, and custom items. The system includes key management with expiration dates, crate cooldowns, and purchase options. Advanced features include reward animations, drop notifications, statistics tracking, and integration with major economy plugins. All configurations are managed through intuitive YAML files and in-game commands, with full permission support for different staff roles.
  • Estrutura Gradle e manifesto para um plugin Spigot multiplataforma.

  • Sistema de crates configuráveis, chaves virtuais persistentes, recompensas ponderadas e animação.

  • Comandos administrativos/jogador, prévia em GUI e abertura por bloco configurado.

Criei o VCrates, com:

  • Caixas configuráveis por config.yml

  • Chaves virtuais persistentes em keys.yml

  • Recompensas ponderadas, comandos no console e anúncios globais

  • GUI de prévia e animação de abertura

  • Abertura por comando ou por clique no bloco configurado

  • Comandos: /vcrates open, preview, keys, give, set e reload

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
16 961
src/main/java/com/kodari/vcrates/VCratesPlugin.java
package com.kodari.vcrates;

import com.kodari.vcrates.command.CratesCommand;
import com.kodari.vcrates.listener.CrateListener;
import com.kodari.vcrates.service.CrateManager;
import com.kodari.vcrates.service.KeyStore;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public class VCratesPlugin extends JavaPlugin {

    private KeyStore keyStore;
    private CrateManager crateManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.keyStore = new KeyStore(this);
        this.keyStore.load();
        this.crateManager = new CrateManager(this, keyStore);
        this.crateManager.load();

        getServer().getPluginManager().registerEvents(new CrateListener(crateManager), this);

        CratesCommand cratesCommand = new CratesCommand(this, crateManager, keyStore);
        PluginCommand command = getCommand("vcrates");
        if (command != null) {
            command.setExecutor(cratesCommand);
            command.setTabCompleter(cratesCommand);
        }
    }

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

    public CrateManager getCrateManager() {
        return crateManager;
    }
}