_._kacperek_._

Stwórz mi plugin pod nazwą GZHOST-THC który posiada wszystkie funkcje w INVENTORY GUI i do konfiguracji wraz z wiadomościami

Plugin ma posiadać: pomoc w INVENTORY GUI pliki konfiguracji ustawienia db na flat lub mysql domyslnie ma byc flat inne rzeczy ktore bedziemy robic to do ustawienien itd w INVENTORY GUI

Plugin ma polegać na niby narkotykach które sa dostępne na świecie ale odzwortowane w minecraft z efektami np marichuana/extasy/pigulki/krzystal itd masz to zrobic wszystko to co jest mozliwe do zjedzenia w minecraft zrob mi ze narkotyki wypadaja z stone oraz z drzew i zweirzat oraz losowy poziom drop do ustawienia

Dodatkowe funkcje: sejf - mozna schowac swoje nartkowyki rynek - wystaw narktoyk na sprzedaz lub kupna zrob sprzedaz i kupno poprzez przyciski myszy i wybranie ilosci w INVENTORY GUI ile ma kupic/sprzedac jakzdobyc - pokazuje w INVENTORY GUI jaki procet dropu z czego danego narkotyku

wersja gry: 1.20

Zrób mi pełna optymalizacje pluginu oraz zapewnij bezpieczeństwo i dobre działanie

zrób też komendy dla administracji które pozwalają danej osobie zablokować sejf czy odebrac możliwość zdobywania narkotykow

Kodari AI
KodariFeb 23 at 7:47 pm 42,986 (v2)

I’ll create a comprehensive drug-themed plugin with GUI system, database support, and all requested features.

GZHostTHC
Advanced drug simulation plugin for Minecraft featuring collectible narcotics that drop from various sources. Includes secure storage safes, player-driven market system for trading, comprehensive admin controls, and fully GUI-based interaction. Supports both flat file and MySQL databases with configurable drop rates and effects for each drug type.

Now I’ll create the GUI implementations. Let me read what I’ll need first to ensure proper implementation:

Now I’ll create all the GUI implementations and remaining files:

Now I’ll create all the GUI implementations:

Now I’ll create all the listeners:

Now I’ll create the commands:

Perfect! Now I’ve created a fully functional drug plugin with comprehensive GUI system. The plugin includes:

Core Features:

  • 8 different drugs (Marihuana, Ekstaza, Pigułki, Kryształ, LSD, Kokaina, Heroina, Amfetamina)

  • Database support (Flat file & MySQL)

  • Configurable drop rates from blocks, trees, animals, and monsters

  • Safe storage system for drugs

  • Player-driven market with buy/sell mechanics

  • Drop rate viewer in GUI

  • Comprehensive help system

  • Admin controls for blocking safes and drops

GUI System:

  • Main menu with navigation

  • Help GUI with drug acquisition info

  • Safe GUI for secure storage

  • Market GUI with pagination

  • Buy/Sell interfaces with amount selection

  • Drop rates display GUI

Security & Optimization:

  • XSeries for cross-version compatibility

  • Vault integration for economy

  • Conversation API for price input

  • Lazy inventory initialization

  • Efficient database management

  • Admin permission system

All GUIs are fully interactive, messages are configurable, and the plugin is ready for production use on Minecraft 1.20!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
33 2,787
src/main/java/com/gzhost/thc/GZHostTHC.java
package com.gzhost.thc;

import com.gzhost.thc.commands.AdminCommand;
import com.gzhost.thc.commands.THCCommand;
import com.gzhost.thc.database.DatabaseManager;
import com.gzhost.thc.inventory.gui.GUIListener;
import com.gzhost.thc.inventory.gui.GUIManager;
import com.gzhost.thc.listeners.BlockBreakListener;
import com.gzhost.thc.listeners.EntityDeathListener;
import com.gzhost.thc.listeners.PlayerInteractListener;
import com.gzhost.thc.managers.ConfigManager;
import com.gzhost.thc.managers.DrugManager;
import com.gzhost.thc.managers.MarketManager;
import com.gzhost.thc.managers.MessageManager;
import com.gzhost.thc.managers.SafeManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class GZHostTHC extends JavaPlugin {
    
    private ConfigManager configManager;
    private MessageManager messageManager;
    private DatabaseManager databaseManager;
    private DrugManager drugManager;
    private SafeManager safeManager;
    private MarketManager marketManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.messageManager = new MessageManager(this);
        this.databaseManager = new DatabaseManager(this);
        this.drugManager = new DrugManager(this);
        this.safeManager = new SafeManager(this);
        this.marketManager = new MarketManager(this);
        this.guiManager = new GUIManager();
        
        this.databaseManager.connect();
        this.drugManager.loadDrugs();
        
        registerCommands();
        registerListeners();
        
        getLogger().info("GZHostTHC został włączony!");
    }
    
    @Override
    public void onDisable() {
        if (this.databaseManager != null) {
            this.databaseManager.disconnect();
        }
        
        getLogger().info("GZHostTHC został wyłączony!");
    }
    
    private void registerCommands() {
        getCommand("thc").setExecutor(new THCCommand(this));
        getCommand("thcadmin").setExecutor(new AdminCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
        Bukkit.getPluginManager().registerEvents(new BlockBreakListener(this), this);
        Bukkit.getPluginManager().registerEvents(new EntityDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerInteractListener(this), this);
    }
    
    public void reload() {
        this.configManager.reload();
        this.messageManager.reload();
        this.drugManager.loadDrugs();
    }
}