lt3_shivangi
๐Ÿ“Ž 1 file 4,680 chars
๐Ÿ“„
pasted-code-1788591570255.txt
txt 69 lines
โ–ถ
Act as an expert Minecraft Java Plugin Developer. Build an enterprise-grade, ultra-optimized Paper/Spigot 1.20+ plugin named "VLTSTRIKECORE". 

This plugin is a complete, modular StrikePractice Addon, Duels/FFA Network Core, and Player Experience Suite designed to surpass ShyamStrikeCore in features, performance, and customization.

### Technical Specifications:
- Main Package: dev.vltstrikecore
- Plugin Name: VLTSTRIKECORE
- Main Class: VLTStrikeCore
- Target API: Paper / Spigot 1.20+
- Integrations/Hooks: StrikePractice API, PlaceholderAPI, Vault, LuckPerms, ProtocolLib (optional for hit-registers/CPS)

---

### Core Module Requirements:

1. Dynamic Duels & Custom FFA System:
   - Duels Engine (/duel ):
     - Custom GUI kit selection, arena voting, and coin/token wager system (Vault support).
     - Best-of-X (Bo3/Bo5) match options and rematch prompts upon duel conclusion.
   - FFA Arenas Engine (/ffa):
     - Multi-arena support with per-arena kits (NoDebuff, Gapple, Sumo, Axe, Soup).
     - Instanced fast-respawn with configurable spawn protection duration.
     - Killstreak System: Tracks killstreaks, triggers global network broadcasts, rewards tokens/items, and adds clickable player bounties (/bounty).

2. Enterprise Player Settings Engine (/settings):
   - Multi-page, inventory-based GUI with persistent data storage (SQLite/MySQL/YAML) featuring toggles for:
     - Gameplay: Auto-GG, Auto-Requeue, Auto-Spectate, Duel Requests, Party Invites, Player Visibility in Lobby.
     - Visuals & HUD: Scoreboard Toggle, Actionbar CPS/Ping Counter, Active Combo Display, Opponent Health Indicator, Hit Color Cosmetics.
     - Audio: Victory Songs, Custom Kill Sounds, Hit Markers, Match Countdown Sounds.
     - Privacy & Mod: Spectator Toggles, Lobby Flight, Private Messaging.

3. Cosmetics & Match Enhancement Suite:
   - Kill Effects: Lightning strikes, Blood explosions, Flame trails, Heart particle bursts, Anvil drops.
   - Victory Animations: Firework displays, Flying Enderdragons, Particle halos, Custom victory broadcasts/chants.
   - Custom Death Messages (/deathmessages): Selectable message packs supporting placeholders: %killer%, %victim%, %weapon%, %killer_hearts%, %combo%, %ping%.

4. Communication, Staff & Utility Suite:
   - Automated Messaging (/autogg): Fully customizable post-match automated messages.
   - Staff Utilities (/ssc, /freeze, /spec):
     - Staff Chat channel with persistent toggle support (/ssc) and cross-server capability.
     - Advanced Freeze System (/freeze ): Freezes movement, opens warning UI, and auto-bans/alerts staff if target disconnects.
     - Silent Spectate Mode: Smooth integration with StrikePractice observer API.
   - Spawn & Lobby Management: Integrated /setspawn, /spawn, lobby flight, block protection, hunger lock, and item drop prevention.

5. Comprehensive Configuration & Storage Architecture:
   Provide complete, fully populated configurations for:
   - config.yml: Core module toggles, database settings (SQLite/MySQL), lobby rules, hit-delay configurations.
   - ffa.yml: Arena coordinates, kit structures, knockback profiles, killstreak milestones, and bounty rules.
   - messages.yml: 100% customizable messages with MiniMessage (Hex) and legacy '&' color code support.
   - sounds.yml: Configurable sound identifiers, volumes, and pitches for all GUI/combat actions.
   - guis.yml: Fully customized inventory layouts, custom item slots, head textures, and dynamic lore placeholders.

---

### Codebase Project Structure:

Organize all Java source files strictly into the following package structure:
- dev.vltstrikecore
  โ”œโ”€โ”€ VLTStrikeCore.java (Plugin Lifecycle & Dependency Injection)
  โ”œโ”€โ”€ dev.vltstrikecore.commands (DuelCommand, FFACommand, SettingsCommand, AutoGGCommand, StaffCommands, AdminCommand, DeathMessagesCommand)
  โ”œโ”€โ”€ dev.vltstrikecore.duels (DuelManager, DuelRequest, KitManager, WagerManager)
  โ”œโ”€โ”€ dev.vltstrikecore.ffa (FFAManager, FFAArena, KillstreakManager, BountyManager)
  โ”œโ”€โ”€ dev.vltstrikecore.listeners (MatchListener, PlayerDeathListener, FFAListener, GUIListener, JoinQuitListener)
  โ”œโ”€โ”€ dev.vltstrikecore.cosmetics (KillEffectManager, VictoryEffectManager, DeathMessageManager)
  โ”œโ”€โ”€ dev.vltstrikecore.managers (PlayerManager, ConfigManager, GUIManager, DatabaseManager)
  โ”œโ”€โ”€ dev.vltstrikecore.hooks (StrikePracticeHook, PAPIExpansion, VaultHook)
  โ””โ”€โ”€ dev.vltstrikecore.utils (ChatUtils, ItemBuilder, SoundUtils, LocationUtils)

Provide the full, production-ready code for all Java classes, plugin.yml, config.yml, ffa.yml, messages.yml, sounds.yml, and guis.yml.
Kodari AI
KodariSep 5 at 7:16 am 4
VLTStrikeCore
A comprehensive StrikePractice addon and network core for Paper 1.20+. Features dynamic duels with kit selection, arena voting, wagers, and Bo3/Bo5 matches. Multi-arena FFA engine with killstreaks, bounties, and instanced respawn. Enterprise settings GUI with persistent storage for gameplay, visual, audio, and privacy toggles. Cosmetics suite with kill effects, victory animations, and customizable death messages. Staff utilities including freeze system, silent spectate, and staff chat. Full configuration system with MiniMessage support across config, FFA, messages, sounds, and GUI layouts. Integrates with StrikePractice, PlaceholderAPI, Vault, and LuckPerms.
  1. Create the Gradle project, plugin metadata, and complete configuration files.

  2. Add utilities, persistence, player settings, GUI, duel/FFA, cosmetics, hooks, commands, and listeners with cross-class wiring.

  3. Register modules, commands, listeners, and lifecycle behavior in VLTStrikeCore.

Implemented the VLTSTRIKECORE Paper/Spigot 1.20+ project from scratch.

  • Added Gradle build setup, plugin metadata, permissions, and commands.

  • Added configurable YAML files for core settings, FFA arenas, messages, sounds, and GUIs.

  • Added player persistence, settings management, GUI system, duel requests, wagers, FFA arenas, killstreaks, bounties, cosmetics, death messages, staff tools, spawn handling, and hooks.

  • Registered all managers, commands, listeners, and lifecycle behavior in VLTStrikeCore.

  • Added MiniMessage and legacy color support plus XSeries-based cross-version item, sound, and particle handling.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
45 1,859
src/main/java/dev/vltstrikecore/VLTStrikeCore.java
package dev.vltstrikecore;

import dev.vltstrikecore.commands.AdminCommand;
import dev.vltstrikecore.commands.AutoGGCommand;
import dev.vltstrikecore.commands.BountyCommand;
import dev.vltstrikecore.commands.DeathMessagesCommand;
import dev.vltstrikecore.commands.DuelCommand;
import dev.vltstrikecore.commands.FFACommand;
import dev.vltstrikecore.commands.SettingsCommand;
import dev.vltstrikecore.commands.StaffCommands;
import dev.vltstrikecore.cosmetics.DeathMessageManager;
import dev.vltstrikecore.cosmetics.KillEffectManager;
import dev.vltstrikecore.cosmetics.VictoryEffectManager;
import dev.vltstrikecore.duels.DuelManager;
import dev.vltstrikecore.ffa.FFAManager;
import dev.vltstrikecore.hooks.PAPIExpansion;
import dev.vltstrikecore.hooks.StrikePracticeHook;
import dev.vltstrikecore.hooks.VaultHook;
import dev.vltstrikecore.listeners.FFAListener;
import dev.vltstrikecore.listeners.GUIListener;
import dev.vltstrikecore.listeners.JoinQuitListener;
import dev.vltstrikecore.listeners.MatchListener;
import dev.vltstrikecore.listeners.PlayerDeathListener;
import dev.vltstrikecore.managers.ConfigManager;
import dev.vltstrikecore.managers.DatabaseManager;
import dev.vltstrikecore.managers.GUIManager;
import dev.vltstrikecore.managers.PlayerManager;
import dev.vltstrikecore.utils.LocationUtils;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.plugin.java.JavaPlugin;

public class VLTStrikeCore extends JavaPlugin {
    @Getter private ConfigManager configs;
    @Getter private DatabaseManager database;
    @Getter private PlayerManager players;
    @Getter private GUIManager gui;
    @Getter private DuelManager duels;
    @Getter private FFAManager ffa;
    @Getter private DeathMessageManager deaths;
    @Getter private KillEffectManager effects;
    @Getter private VictoryEffectManager victory;
    @Getter private StrikePracticeHook strikePractice;
    @Getter private VaultHook vault;
    @Getter private PAPIExpansion placeholders;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        configs = new ConfigManager(this);
        database = new DatabaseManager(this);
        players = new PlayerManager(this, database);
        gui = new GUIManager(this);
        duels = new DuelManager(this);
        ffa = new FFAManager(this);
        deaths = new DeathMessageManager(this);
        effects = new KillEffectManager();
        victory = new VictoryEffectManager();
        strikePractice = new StrikePracticeHook(this);
        vault = new VaultHook(this);
        placeholders = new PAPIExpansion(this);
        registerCommands();
        registerListeners();
        getLogger().info("VLTSTRIKECORE enabled with " + ffa.arenas().size() + " FFA arenas.");
    }

    private void registerCommands() {
        getCommand("duel").setExecutor(new DuelCommand(this));
        getCommand("ffa").setExecutor(new FFACommand(this));
        getCommand("settings").setExecutor(new SettingsCommand(this));
        getCommand("autogg").setExecutor(new AutoGGCommand(this));
        StaffCommands staff = new StaffCommands(this);
        getCommand("ssc").setExecutor(staff);
        getCommand("freeze").setExecutor(staff);
        getCommand("spec").setExecutor(staff);
        AdminCommand admin = new AdminCommand(this);
        getCommand("setspawn").setExecutor(admin);
        getCommand("spawn").setExecutor(admin);
        getCommand("deathmessages").setExecutor(new DeathMessagesCommand(this));
        getCommand("bounty").setExecutor(new BountyCommand(this));
        getServer().getPluginManager().registerEvents(staff, this);
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new GUIListener(gui), this);
        getServer().getPluginManager().registerEvents(new JoinQuitListener(this), this);
        getServer().getPluginManager().registerEvents(new MatchListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        getServer().getPluginManager().registerEvents(new FFAListener(this), this);
    }

    public Location spawn() {
        Location configured = getConfig().getLocation("lobby.spawn");
        if (configured != null) {
            return configured;
        }
        return LocationUtils.parse(getConfig().getString("lobby.world", "world"), getConfig().getString("lobby.coordinates", "0,64,0"));
    }

    @Override
    public void onDisable() {
        if (players != null) {
            players.saveAll();
        }
        if (database != null) {
            database.close();
        }
    }

    public ConfigManager configs() {
        return configs;
    }

    public DatabaseManager database() {
        return database;
    }

    public PlayerManager players() {
        return players;
    }

    public GUIManager gui() {
        return gui;
    }

    public DuelManager duels() {
        return duels;
    }

    public FFAManager ffa() {
        return ffa;
    }

    public DeathMessageManager deaths() {
        return deaths;
    }

    public KillEffectManager effects() {
        return effects;
    }

    public VictoryEffectManager victory() {
        return victory;
    }
}