kaliberr_._66218

Build the ChaosItems plugin based on the attached file.

📎 1 file 3,023 chars
📄
pasted-code-1794617185259.txt
txt 30 lines
▶
Create a complete, production-ready Paper 1.21.8 plugin called ChaosItems for the ChaosGG server. Replicate the PvP style and mechanics of anarchia.gg, but invent completely original, unique names for all items, costumes, and sets (formatted with Kyori MiniMessage hex gradients).

1. 9 Custom Legendary Items (ActionBar cooldowns, sounds & particles):

• Lifesteal Sword (Netherite Sword): Heals attacker for 25% of damage dealt on hit; 15% chance to inflict Wither I for 3s.
• Short-Range Teleport Wand (Blaze Rod): Right-click teleports 8 blocks forward safely and grants Speed II for 3s (15s cooldown).
• High-Damage Knockback Blade (Netherite Sword): +20% melee damage; Right-click knocks back enemies within 4 blocks and deals 4 true damage (25s cooldown).
• Target-Freezing Throwable (Snowball): Hitting an enemy freezes them for 3s (Slowness 255, Jump Boost 128, Blindness I) with ice particles (30s cooldown).
• AoE Smash Mace (Mace): Falling hit on ground or player launches enemies within 5 blocks up and deals AoE damage (25s cooldown).
• Grinch Axe Equivalent (Netherite Axe): Right-click or hit on cooldown strikes target with visual lightning, deals 15% of target's current HP as bonus damage, knocks them back strongly, and applies Weakness I for 4s (30s cooldown).
• Illusionist Wand Equivalent (End Rod): Right-click grants true Invisibility (hides armor from enemies using Paper entity equipment packets/API + applies Invisibility and Speed II) for 5s (35s cooldown).
• Trap Cage Equivalent (Iron Bars): Right-clicking near an enemy spawns a temporary 5x5 hollow obsidian/glass cage trapping both players inside for 10s, then automatically restores original blocks (45s cooldown).
• Hyro Reroll / Changer Orb Equivalent (Amethyst Shard): Right-clicking while holding a weapon or armor piece in the off-hand rerolls/upgrades one random enchantment (up to Protection VI / Sharpness VI) or grants a random 8s combat buff (Strength II, Absorption III, or Resistance II) (40s cooldown).

2. Cosmetic Costumes (/kostiumy GUI):

• 27-slot GUI opened with /kostiumy to equip/unequip 3 custom-named RGB leather armor costumes (CustomModelData support, permission chaositems.costume.):
	• Tank Costume: +4 Max Health and +10% melee damage.
	• Assassin Costume: Permanent Speed I and 15% dodge chance.
	• Pyro Costume: Permanent Fire Resistance, Speed I, and ignites attackers.

3. Custom Anarchic Armor Set (Chaos Set):

• Custom-named 4-piece Netherite Armor set with Protection VI, Unbreaking V, Thorns III, plus NamespacedKey AttributeModifiers (+4 Max Health and +10% Knockback Resistance per piece).
• Full Set Bonus: Permanent Strength I and Regeneration I while wearing all 4 pieces.

4. Commands & Technical Standards (Paper 1.21.8):

• Commands: /chaositems give   [amount] and /chaositems reload with tab-completion (chaositems.admin).
• Use PersistentDataContainer (PDC) for strict item identification and generate a detailed config.yml for all names, lore, cooldowns, and damage values.
Kodari AI
KodariNov 14 at 12:59 am 3
ChaosItems
ChaosItems is a Paper 1.21.8 plugin for the ChaosGG server delivering anarchic PvP mechanics. It features 9 legendary items with unique abilities including lifesteal swords, teleport wands, freezing snowballs, AoE maces, lightning axes, invisibility wands, trap cages, and enchantment rerolling orbs—each with ActionBar cooldowns, sounds, and particles. The plugin includes a /kostiumy GUI for equipping three cosmetic RGB leather costumes with passive bonuses, plus a full Chaos Netherite armor set with custom enchantments and a permanent Strength/Regeneration set bonus. All items use PersistentDataContainer identification, MiniMessage hex gradients, and a fully configurable config.yml. Commands include /chaositems give and reload with tab completion and permission checks.
  1. Set up the Paper 1.21.8 plugin and configurable item factory.

  2. Implement abilities, cooldowns, the Chaos armor set, and temporary cages.

  3. Add costume effects and GUI, plus admin commands and tab completion.

Implemented ChaosItems for Paper 1.21.8 with the nine custom abilities, configurable item names/lore/cooldowns, the Chaos armor set, the costume wardrobe, and /chaositems admin commands. Configure it in src/main/resources/config.yml; use /kostiumy for costumes and /chaositems give|reload for administration.

kaliberr_._66218

czy potrafilbys stworzyc do tych eventowek wlasne tekstury

Kodari AI
KodariNov 14 at 1:02 am 1

Tak — mogę przygotować własne tekstury do eventówek. W tym projekcie tworzenie tekstur jest obecnie wyłączone; włącz je w Ustawienia → Generation. Możesz też włączyć je dla wszystkich projektów na https://kodari.ai/settings?tab=features.

kaliberr_._66218

czy teraz mozesz?

Kodari AI
KodariNov 14 at 1:03 am 1

Tak — mogę teraz stworzyć własne tekstury do eventówek. Mogę przygotować komplet dla wszystkich 9 przedmiotów albo zacząć od wybranego; napisz, które wolisz. Tekstury będą wymagały też resource packa, żeby wyświetlały się w grze.

kaliberr_._66218

zrob dla wszystkich

Kodari AI
KodariNov 14 at 1:06 am 31

Gotowe — stworzyłem tekstury dla wszystkich 9 eventówek: Sanguine Edge, Rift Caller, Impact Reaver, Frostbite Sphere, Quake Maul, Embercleft Axe, Veil Scepter, Prism Snare i Chaos Heart.

Pliki PNG są w src/main/resources/resourcepack/assets/chaositems/textures/item/. To same tekstury — żeby wyświetlały się w grze, trzeba jeszcze powiązać je z przedmiotami w resource packu i przypisać właściwe modele.

kaliberr_._66218

jak moge wziasc te rzeczy?

Kodari AI
KodariNov 14 at 1:20 am 1

Jeśli chodzi o przedmioty w grze, użyj:

/chaositems give <nick> <id> [ilość]

Wymaga uprawnienia chaositems.admin. Dokładne identyfikatory znajdziesz w config.yml.

Wygenerowane pliki PNG są w projekcie w src/main/resources/resourcepack/assets/chaositems/textures/item/. Same tekstury nie pojawią się jeszcze na przedmiotach w grze — trzeba je najpierw podpiąć w resource packu i przypisać przedmiotom.

kaliberr_._66218

zrob tego rescoure packa zip

Kodari AI
KodariNov 14 at 1:25 am 1
  1. Dodam poprawne modele i przypiszę tekstury do wszystkich 9 eventówek.

  2. Przygotuję generowanie gotowego ZIP-a z poziomu pluginu, żeby serwer tworzył go w folderze plugins/ChaosItems/.

  3. Ustawię identyfikatory modeli na przedmiotach i zachowam obecne nazwy oraz mechaniki.

Dodałem konfigurację resource packa i generator ZIP-a. Po zbudowaniu pluginu i uruchomieniu go na serwerze plik zostanie utworzony tutaj:

plugins/ChaosItems/ChaosItems-resourcepack.zip

ZIP zawiera tekstury i modele wszystkich 9 eventówek, a plugin przypisuje im wymagane dane modelu.

kaliberr_._66218

popraw ten plugin zeby eventowki byly lepiej zrobione i zeby ogulnie to bylo nie bylo takie mroczne tylko cos na bazie anarchia gg ale inne dodaj najpotezniejszy miecz dodaj ksiegi i popraw zeby kostiumy byly ja na anarchia gg postaraj sie zrobic jeszcze wiecej wymyslonych eventowek na bazie anarchia gg ale moga byc rowniez inne zrob totem ulaskawienia ale inna nazwa popraw wszystkie bledy i dodaj do tego chaos setu template i by tee napsy nie byly wykrzywione tylko proste pogrubione i by te eventowki byly mocne a nie bez fektu

Kodari AI
KodariNov 14 at 1:34 am 26

Plan:

  1. Naprawię działanie obecnych eventówek i błędy w ich mechanikach.

  2. Rozbuduję zestaw o mocny miecz, księgi, „ułaskawiający” totem i nowe przedmioty.

  3. Ulepszę kostiumy, Chaos Set oraz czytelne, pogrubione nazwy i opisy.

  4. Uzupełnię konfigurację i resource pack, by nowe przedmioty miały spójne identyfikatory i wygląd.

Przerobiłem ChaosItems: nazwy są teraz proste, pogrubione i w jaśniejszych gradientach, a kostiumy mają żywsze kolory i czytelniejsze przyciski w GUI. Naprawiłem też lodową śnieżkę — prawy klik teraz faktycznie rzuca oznaczoną śnieżkę i zużywa jeden przedmiot.

Dodałem sześć eventówek:

  • astral_sword — miecz zadający o 75% większe obrażenia i mający szansę spowolnić przeciwnika;

  • storm_trident — trójząb z błyskawicą, odrzuceniem i premią do obrażeń;

  • valor_book i renewal_book — zużywalne księgi z bojowymi wzmocnieniami;

  • pardon_totem — totem odrodzenia, który po aktywacji leczy i daje ochronne efekty;

  • sunflare_orb — ognista fala z obrażeniami obszarowymi, podpaleniem i odrzuceniem.

Chaos Set dostał złoty wzór Sentry. Kostiumy zachowują swoje bonusy: Tank zwiększa zdrowie i obrażenia, Assassin daje szybkość i szansę uniku, a Pyro — odporność na ogień, szybkość i podpala atakujących.

Nowe ID możesz nadawać przez /chaositems give <nick> <id> [ilość]. Resource pack jest eksportowany przy uruchomieniu pluginu do plugins/ChaosItems/ChaosItems-resourcepack.zip.

Uwaga o teksturach: udało się rozjaśnić 5 wcześniejszych grafik i stworzyć 4 nowe. Zabrakło kredytów Studio na pozostałe podmiany oraz osobne tekstury miecza i trójzębu — te dwa korzystają obecnie z istniejących grafik.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
52 1,901
src/main/java/dev/chaosgg/chaositems/ChaosItemsPlugin.java
package dev.chaosgg.chaositems;

import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

public final class ChaosItemsPlugin extends JavaPlugin {
    private ChaosItemFactory itemFactory;
    private CostumeManager costumeManager;
    private ChaosItemsListener listener;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        exportResourcePack();
        itemFactory = new ChaosItemFactory(this);
        costumeManager = new CostumeManager(this);
        listener = new ChaosItemsListener(this, itemFactory, costumeManager);
        Bukkit.getPluginManager().registerEvents(listener, this);
        Bukkit.getPluginManager().registerEvents(costumeManager, this);

        ChaosItemsCommand commandHandler = new ChaosItemsCommand(this, itemFactory, costumeManager);
        PluginCommand chaosItemsCommand = getCommand("chaositems");
        if (chaosItemsCommand != null) {
            chaosItemsCommand.setExecutor(commandHandler);
            chaosItemsCommand.setTabCompleter(commandHandler);
        }
        PluginCommand costumesCommand = getCommand("kostiumy");
        if (costumesCommand != null) {
            costumesCommand.setExecutor(commandHandler);
        }
    }

    @Override
    public void onDisable() {
        if (listener != null) {
            listener.shutdown();
        }
        if (costumeManager != null) {
            costumeManager.shutdown();
        }
    }

    public String message(String path) {
        return getConfig().getString("messages." + path, "<red>Missing message: " + path);
    }

    private void exportResourcePack() {
        Path output = getDataFolder().toPath().resolve("ChaosItems-resourcepack.zip");
        try {
            Files.createDirectories(getDataFolder().toPath());
            InputStream fileList = getResource("resourcepack/pack-files.txt");
            if (fileList == null) {
                throw new IOException("Missing resourcepack/pack-files.txt");
            }
            try (BufferedReader reader = new BufferedReader(new InputStreamReader(fileList, StandardCharsets.UTF_8));
                 ZipOutputStream zip = new ZipOutputStream(Files.newOutputStream(output))) {
                String path;
                while ((path = reader.readLine()) != null) {
                    if (path.isBlank()) {
                        continue;
                    }
                    InputStream resource = getResource("resourcepack/" + path);
                    if (resource == null) {
                        throw new IOException("Missing resourcepack file: " + path);
                    }
                    try (resource) {
                        zip.putNextEntry(new ZipEntry(path));
                        resource.transferTo(zip);
                        zip.closeEntry();
                    }
                }
            }
            getLogger().info("Created resource pack: " + output);
        } catch (IOException exception) {
            getLogger().severe("Could not create resource pack: " + exception.getMessage());
        }
    }
}