dedlosplv2

zrób mi plugin na INVENTORY GUI do robienia kostiómów i petów

Kodari AI
KodariJun 25 at 8:28 pm 25
CosmeticsPlus
A feature-rich cosmetics plugin with interactive inventory GUIs for costumes and pets. Players can browse and equip predefined armor costumes (with leather color support) and spawn pet entities that follow them around. Includes a main menu GUI, costume browser, pet browser, and remove-all option. All costumes and pets are fully configurable via config.yml. Commands: /cosmetics.

Plan:

  • GUI framework (InventoryHandler, InventoryButton, InventoryGUI, GUIManager, GUIListener)

  • Costume system (Costume data class, CostumeManager, CostumeGUI)

  • Pet system (Pet data class, PetManager, PetListener, PetGUI)

  • MainMenuGUI + CosmeticsCommand

  • Main plugin class, plugin.yml, config.yml, build.gradle


Plugin gotowy. Co dostałeś:

Komendy: /cosmetics (aliasy: /cos, /cosplay)

GUI — 3 okna:

Okno
Opis
Główne menu
Kostiumy / Zdejmij wszystko / Pety
Kostiumy
Grid z wszystkimi strojami, podświetlony aktywny, przycisk zdejmowania
Pety
Grid z petami, podświetlony aktywny, powrót do menu

Kostiumy (5 domyślnych): Czarodziej (fiolet), Rycerz (żelazo), Ogniarz (czerwień), Oceaniarz (błękit), Diamencik — wszystkie konfigurowane w config.yml wraz z kolorami skórzanej zbroi.

Pety (5 domyślnych): Kot, Wilk, Papuga, Królik, Lis — śledzą właściciela (teleport co sekundę gdy >6 bloków), nieśmiertelne, ciche.

Mechaniki:

  • Założenie kostiumu zapisuje oryginalną zbroję gracza i przywraca ją po zdjęciu

  • Pety znikają przy wyjściu gracza z serwera

  • Każdą pozycję możesz dodać/edytować w config.yml

dedlosplv2

zró mi plugin o skrzynkach jak z anarchi gg i jak ktoś rozdaje to muszi napisać czas i ile kluczy a komenda to : /keyall give [nazwa gracza albo all]

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
18 1,178
src/main/java/com/kodari/cosmeticsplus/CosmeticsPlus.java
package com.kodari.cosmeticsplus;

import com.kodari.cosmeticsplus.command.CosmeticsCommand;
import com.kodari.cosmeticsplus.costume.CostumeManager;
import com.kodari.cosmeticsplus.inventory.gui.GUIListener;
import com.kodari.cosmeticsplus.inventory.gui.GUIManager;
import com.kodari.cosmeticsplus.pet.PetListener;
import com.kodari.cosmeticsplus.pet.PetManager;
import lombok.Getter;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

public class CosmeticsPlus extends JavaPlugin {

    @Getter private GUIManager guiManager;
    @Getter private CostumeManager costumeManager;
    @Getter private PetManager petManager;

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

        guiManager = new GUIManager();
        costumeManager = new CostumeManager(this);
        petManager = new PetManager(this);

        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(new PetListener(this), this);

        getCommand("cosmetics").setExecutor(new CosmeticsCommand(this));

        getLogger().info(ChatColor.GREEN + "CosmeticsPlus włączony! Kostiumów: "
                + costumeManager.getCostumes().size()
                + " | Petów: " + petManager.getPets().size());
    }

    @Override
    public void onDisable() {
        petManager.shutdown();
        getLogger().info("CosmeticsPlus wyłączony.");
    }

    public String msg(String key) {
        String raw = getConfig().getString("messages." + key, "&cBrak wiadomości: " + key);
        return ChatColor.translateAlternateColorCodes('&', raw);
    }
}