adarshkumar99

Create a production-ready Minecraft plugin named FestivalCore for Paper/Purpur 1.21.11, using Java 21 and Gradle or Maven.

The plugin should be a complete Indian Festival System focused primarily on Diwali and Chhath Puja, with a clean, modular architecture so more festivals can be added later.

CORE REQUIREMENTS

Plugin name: FestivalCore Minecraft: 1.21.11 Server software: Paper/Purpur Java: 21 Main package: "com.festivalcore"

The plugin must be:

  • Fully configurable
  • Modular
  • Performance optimized
  • Async where appropriate
  • Permission based
  • Compatible with Paper/Purpur
  • Safe against command abuse
  • Easy to expand
  • No unnecessary dependencies

DIWALI SYSTEM

Add a complete Diwali event system:

  • Automatic Diwali event
  • Manual event start/stop
  • Diwali announcements
  • Custom fireworks
  • Firecracker particle effects
  • Diya system
  • Decorative lanterns
  • Rangoli decorations
  • Diwali gift boxes
  • Festival particles
  • Festival sounds
  • Reward system
  • Temporary event areas
  • Broadcast messages
  • Countdown system
  • Player participation tracking

Commands:

/festival diwali /festival diwali start /festival diwali stop /festival diwali fireworks /festival diwali gift /festival diwali reload

CHHATH PUJA SYSTEM

Create a complete Chhath Puja system:

  • Chhath event
  • Chhath Ghat decorations
  • Diya decorations
  • Puja basket/soop themed custom item
  • Festival flags
  • Flower/decorative particles
  • Sunrise event
  • Sunset event
  • Chhath announcements
  • Fireworks at configured times
  • Rewards
  • Event countdown
  • Configurable event location

Commands:

/festival chhath /festival chhath start /festival chhath stop /festival chhath ghat /festival chhath sunrise /festival chhath sunset

Do not use disrespectful or inaccurate representations of religious practices. Keep the system festive and decorative.

CUSTOM RESOURCE PACK

Create a complete resource-pack-ready system.

Use custom textures/models for:

  • 3D Diya
  • 3D Lantern
  • Firecracker
  • Firework launcher
  • Rangoli
  • Diwali gift box
  • Chhath Puja basket/soop
  • Festival flags
  • Festival decorations
  • GUI icons

Use modern Minecraft item-model/resource-pack methods compatible with 1.21.11.

The plugin should identify custom items safely using PersistentDataContainer rather than relying only on display names.

Provide:

  • Resource-pack folder structure
  • Item model files
  • Texture folder structure
  • Example JSON model files
  • Pack metadata
  • CustomModelData/item-model implementation as appropriate for 1.21.11
  • Instructions for replacing textures

Do not claim that a resource pack can be created entirely by Java. Clearly separate plugin code from resource-pack assets.

FESTIVAL FLAGS

Create a flag system.

Commands:

/festival flag diwali /festival flag chhath /festival flag festival /festival flag remove

Allow configurable flag designs and custom textures.

Flags should be placeable decorations and should not cause excessive entities or lag.

GOD MODE

Add an admin-only God Mode system.

Commands:

/festival god /festival god <player>

Features:

  • Prevent damage
  • Prevent fall damage
  • Prevent fire damage
  • Prevent drowning
  • Prevent suffocation
  • Prevent starvation
  • Prevent projectile damage
  • Prevent explosion damage

Permissions:

festival.god festival.god.others

Make sure God Mode does not create unnecessary event-processing overhead.

FIREWORK SYSTEM

Create a highly configurable fireworks engine.

Support:

  • Multiple colors
  • Flicker
  • Trail
  • Small/large ball
  • Star
  • Burst
  • Multiple rockets
  • Configurable height
  • Configurable delay
  • Automatic shows
  • Manual shows
  • Different patterns

Commands:

/festival fireworks /festival fireworks start /festival fireworks stop

Allow predefined shows such as:

diwali_show chhath_show grand_show

GUI

Create a modern inventory GUI.

Main GUI:

FestivalCore

Options:

🪔 Diwali 🌅 Chhath Puja 🎆 Fireworks 🚩 Flags 🎁 Rewards 🛡️ God Mode ⚙️ Settings ℹ️ Information

Use configurable GUI names, lore, slots and icons.

Prevent players from taking GUI items.

REWARD SYSTEM

Create configurable rewards.

Example:

diwali: first-join-reward: enabled: true commands:

  • "give %player% diamond 3"

chhath: participation-reward: enabled: true commands:

  • "give %player% gold_ingot 5"

Support placeholders:

%player% %uuid% %world% %event%

Do not hardcode economy values.

CONFIGURATION

Create:

config.yml messages.yml diwali.yml chhath.yml fireworks.yml gui.yml items.yml permissions.yml

Everything important should be configurable.

Example:

diwali: enabled: true fireworks: true diyas: true rangoli: true gifts: true

chhath: enabled: true ghat: true sunrise-event: true sunset-event: true

fireworks: enabled: true automatic-show: true

PERMISSIONS

Create:

festival.admin festival.reload festival.diwali festival.chhath festival.fireworks festival.flags festival.god festival.god.others festival.rewards festival.gui

COMMAND

Main command:

/festival

Subcommands:

/festival help /festival gui /festival diwali /festival chhath /festival fireworks /festival flag /festival god /festival reward /festival reload /festival version

Add tab completion for all commands.

PLACEHOLDERS

Support PlaceholderAPI if installed, but make it optional.

Useful placeholders:

%festivalcore_event% %festivalcore_diwali% %festivalcore_chhath% %festivalcore_fireworks% %festivalcore_god%

DATABASE / DATA

Do not require an external database by default.

Use a lightweight local YAML/JSON data system for:

  • Player participation
  • Rewards claimed
  • Event data
  • Settings

Make the storage layer modular so SQLite can be added later.

PERFORMANCE

The plugin must:

  • Avoid unnecessary repeating tasks
  • Avoid spawning huge numbers of entities
  • Automatically clean temporary effects
  • Prevent particle/firework spam
  • Use scheduled tasks responsibly
  • Avoid blocking the main server thread
  • Handle multiple players safely

Add configurable limits such as:

max-fireworks max-particles max-active-effects event-radius

ADMIN SETUP

Add:

/festival setup

This should provide an easy setup system for:

  • Diwali location
  • Chhath Ghat location
  • Firework location
  • Event area

Store locations in configuration.

AUTO EVENT SYSTEM

Allow admins to configure automatic events:

events: diwali: enabled: true date: "..." time: "20:00"

chhath: enabled: true date: "..." time: "..."

Also provide manual start/stop commands.

SAFETY

Never use dangerous real-world instructions.

All fireworks/firecrackers are purely Minecraft visual effects.

Do not modify vanilla gameplay globally unless explicitly configured.

CODE QUALITY

Use:

  • Clean architecture
  • Interfaces where useful
  • Services
  • Managers
  • Listeners
  • Command handlers
  • Utility classes
  • Proper logging
  • JavaDocs for important public classes
  • Meaningful class names
  • No duplicated code

Suggested structure:

com.festivalcore ├── FestivalCore.java ├── command ├── config ├── diwali ├── chhath ├── fireworks ├── flags ├── god ├── gui ├── items ├── rewards ├── resourcepack ├── storage ├── listener ├── manager ├── scheduler └── util

BUILD FILE

Provide a complete Gradle or Maven project including:

  • build file
  • plugin.yml
  • source code
  • resources
  • configs
  • README
  • resource-pack structure

The project must compile successfully on Java 21.

OUTPUT REQUIREMENT

Do not give pseudo-code.

Generate the actual complete source code for every required file.

Clearly show each file using:

FILE: path/to/File.java

followed by its complete contents.

Do not omit important classes with statements such as "implement similarly".

If the response is too long, split the project into multiple parts and continue from exactly where the previous part ended.

At the end provide:

  1. Complete project tree
  2. Build instructions
  3. Installation instructions
  4. Resource-pack installation instructions
  5. All commands
  6. All permissions
  7. Configuration guide
  8. Example screenshots/mockup descriptions for the GUI
  9. Testing checklist
  10. Common errors and fixes

The final result should be a professional, unique-looking FestivalCore plugin suitable for a Minecraft 1.21.11 server.

Kodari AI
KodariOct 1 at 3:25 pm 2
FestivalCore
FestivalCore is a comprehensive Indian festival plugin for Paper 1.21.11 featuring complete Diwali and Chhath Puja event systems with custom fireworks, particle effects, decorative items, and gift rewards. It includes a modular architecture with configurable GUIs, flag placement system, admin god mode, and a resource-pack framework for custom 3D models. The plugin offers automatic event scheduling, performance-optimized effects, and a lightweight YAML storage system with optional PlaceholderAPI support.
  1. Set up the Java 21/Paper project, plugin metadata, and configurable defaults.

  2. Implement festival state, automatic scheduling, fireworks, rewards/storage, custom items and flags.

  3. Add commands, protected GUI, God Mode, optional PlaceholderAPI, and resource-pack-ready model assets.

  4. Document setup, configuration, commands, permissions, installation, and testing.

Created the FestivalCore Java 21/Paper project with the plugin source, YAML configuration, commands, permissions, local YAML storage, optional PlaceholderAPI expansion, and resource-pack model scaffolding.

1. Project tree

Plain Text
FestivalCore/
├── build.gradle
├── settings.gradle
├── README.md
├── src/main/
│   ├── java/com/festivalcore/
│   │   ├── FestivalCore.java
│   │   ├── command/FestivalCommand.java
│   │   ├── config/ConfigManager.java
│   │   ├── festival/FestivalType.java
│   │   ├── flags/FlagManager.java
│   │   ├── fireworks/FireworksManager.java
│   │   ├── god/GodModeManager.java
│   │   ├── gui/FestivalMenu.java
│   │   ├── gui/FestivalMenuListener.java
│   │   ├── items/FestivalItemService.java
│   │   ├── listener/FestivalListener.java
│   │   ├── manager/FestivalManager.java
│   │   ├── placeholder/FestivalPlaceholder.java
│   │   ├── rewards/RewardManager.java
│   │   ├── storage/Storage.java
│   │   ├── storage/YamlStorage.java
│   │   └── util/Text.java
│   └── resources/
│       ├── plugin.yml
│       ├── config.yml
│       ├── messages.yml
│       ├── diwali.yml
│       ├── chhath.yml
│       ├── fireworks.yml
│       ├── gui.yml
│       ├── items.yml
│       └── permissions.yml
└── resource-pack/
    ├── pack.mcmeta
    ├── README.md
    └── assets/festivalcore/
        ├── items/                 # Ten item model definitions
        └── models/item/           # Ten referenced model JSON files

2. Build

With Java 21 and Gradle installed:

Shell
gradle clean build

The jar is expected at build/libs/FestivalCore-1.0.0.jar. I did not run a build or server test here.

3. Installation

Copy the jar to the Paper/Purpur server’s plugins/ folder and restart. PlaceholderAPI is optional. XSeries is declared as a project dependency; ensure it is available to the plugin at runtime through your deployment setup.

4. Resource pack

The pack includes item-definition/model JSON and texture paths, but does not include PNG artwork or finished custom 3D meshes. Add original artwork under resource-pack/assets/festivalcore/textures/item/, validate the pack metadata/schema for the exact client release, then zip and distribute the pack separately. The plugin itself does not generate textures.

5. Commands

  • /festival help, /festival version, /festival gui, /festival reload

  • /festival diwali [start|stop|fireworks|gift]

  • /festival chhath [start|stop|ghat|sunrise|sunset]

  • /festival fireworks [start [diwali_show|chhath_show|grand_show]|stop]

  • /festival flag <diwali|chhath|festival|remove>

  • /festival god [player]

  • /festival reward

  • /festival setup <diwali|ghat|fireworks|area>

6. Permissions

festival.admin, festival.reload, festival.diwali, festival.chhath, festival.fireworks, festival.flags, festival.god, festival.god.others, festival.rewards, festival.gui.

7. Configuration guide

The files separate general settings and locations (config.yml), messages (messages.yml), festival settings/rewards (diwali.yml, chhath.yml), shows (fireworks.yml), GUI layout (gui.yml), item models and appearance (items.yml), and permission notes (permissions.yml). Automatic event dates use yyyy-MM-dd and server-local HH:mm; configure the dates for your community.

8. GUI mock-up

The default menu is a three-row chest: Diwali and Chhath options on the left, fireworks/flags/rewards/God Mode across the middle, Settings on the right, and Information centered on the bottom row. Clicks and drags are cancelled.

9. Testing checklist

Check startup/reload, permissions, GUI item protection, event start/stop, automatic dates, configured locations, firework caps, custom item PDC identity, flag placement/removal, God Mode damage handling, reward claim limits, and PlaceholderAPI with and without the plugin installed.

10. Common fixes

  • No fireworks: set /festival setup fireworks in a loaded world and confirm the show name.

  • Vanilla-looking items: install the pack and verify the model keys and texture paths match items.yml.

  • No automatic event: check the enabled flag, server-local date/time, and date format.

  • No placeholders: install PlaceholderAPI and restart the server.

The resource-pack artwork and build/runtime verification remain the main items to complete before calling this release production-ready.

adarshkumar99

Plugin link in .jar give me

Kodari AI
KodariOct 1 at 3:29 pm 1

Do you mean add a website or download URL to the plugin metadata inside the .jar, or do you want me to provide a downloadable .jar file?

Kodari can make mistakes. Review important code before using.
Files
resource-pack
src
build.gradle
README.md
settings.gradle
Code
51 1,480
src/main/java/com/festivalcore/FestivalCore.java
package com.festivalcore;

import com.cryptomorin.xseries.particles.XParticle;
import com.festivalcore.command.FestivalCommand;
import com.festivalcore.config.ConfigManager;
import com.festivalcore.festival.FestivalType;
import com.festivalcore.flags.FlagManager;
import com.festivalcore.fireworks.FireworksManager;
import com.festivalcore.god.GodModeManager;
import com.festivalcore.gui.FestivalMenuListener;
import com.festivalcore.items.FestivalItemService;
import com.festivalcore.listener.FestivalListener;
import com.festivalcore.manager.FestivalManager;
import com.festivalcore.placeholder.FestivalPlaceholder;
import com.festivalcore.rewards.RewardManager;
import com.festivalcore.storage.Storage;
import com.festivalcore.storage.YamlStorage;
import com.festivalcore.util.Text;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public final class FestivalCore extends JavaPlugin {
    private ConfigManager configs;
    private Storage storage;
    private FestivalManager festivals;
    private FireworksManager fireworks;
    private FestivalItemService items;
    private RewardManager rewards;
    private GodModeManager godMode;
    private FlagManager flags;
    private FestivalMenuListener menu;
    private NamespacedKey flagKey;

    @Override
    public void onEnable() {
        configs = new ConfigManager(this);
        configs.load();
        storage = new YamlStorage(this);
        festivals = new FestivalManager(this);
        fireworks = new FireworksManager(this);
        items = new FestivalItemService(this);
        rewards = new RewardManager(this, storage);
        godMode = new GodModeManager();
        flags = new FlagManager(this, items);
        menu = new FestivalMenuListener(this);
        flagKey = new NamespacedKey(this, "festival_flag");
        FestivalCommand command = new FestivalCommand(this);
        getCommand("festival").setExecutor(command);
        getCommand("festival").setTabCompleter(command);
        Bukkit.getPluginManager().registerEvents(new FestivalListener(this), this);
        Bukkit.getPluginManager().registerEvents(menu, this);
        festivals.startAutomaticChecks();
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) new FestivalPlaceholder(this).register();
        getLogger().info("FestivalCore enabled. Decorative effects are limited by the configured caps.");
    }

    @Override
    public void onDisable() {
        if (festivals != null) festivals.stopAll();
        if (fireworks != null) fireworks.cleanup();
        if (storage != null) storage.save();
    }

    public void reloadFestival() {
        configs.reload();
        reloadConfig();
    }

    public Location getEventLocation(String name) {
        String serialized = getConfig().getString("settings.locations." + name, "");
        if (serialized == null || serialized.isBlank()) return null;
        String[] parts = serialized.split(",");
        if (parts.length < 4) return null;
        World world = Bukkit.getWorld(parts[0]);
        if (world == null) return null;
        try {
            float yaw = parts.length > 4 ? Float.parseFloat(parts[4]) : 0;
            float pitch = parts.length > 5 ? Float.parseFloat(parts[5]) : 0;
            return new Location(world, Double.parseDouble(parts[1]), Double.parseDouble(parts[2]), Double.parseDouble(parts[3]), yaw, pitch);
        } catch (NumberFormatException exception) {
            getLogger().warning("Invalid saved location for " + name);
            return null;
        }
    }

    public void giveItem(Player player, String id) {
        org.bukkit.inventory.ItemStack item = items.create(id);
        if (item == null) { Text.message(player, configs.prefix(), "&cCould not create item: " + id); return; }
        if (player.getInventory().addItem(item).isEmpty()) Text.message(player, configs.prefix(), configs.message("item-received").replace("%item%", id));
        else player.getWorld().dropItemNaturally(player.getLocation(), item);
    }

    public void recordParticipation(Player player, FestivalType type) {
        storage.recordParticipation(player.getUniqueId(), type.key());
        Text.message(player, configs.prefix(), configs.message("participation").replace("%event%", type.displayName()));
    }

    public boolean claimAvailableReward(Player player) {
        boolean claimed = false;
        for (FestivalType type : FestivalType.values()) if (festivals.isActive(type)) claimed |= rewards.participation(player, type);
        if (!claimed) Text.message(player, configs.prefix(), configs.message("reward-unavailable"));
        return claimed;
    }

    public void toggleGod(org.bukkit.command.CommandSender sender, Player target) {
        boolean enabled = godMode.toggle(target.getUniqueId());
        Text.message(target, configs.prefix(), configs.message(enabled ? "god-enabled" : "god-disabled"));
        if (!sender.equals(target)) Text.message(sender, configs.prefix(), "&eGod Mode for " + target.getName() + ": " + (enabled ? "enabled" : "disabled"));
    }

    public void playFirecracker(Location location) {
        XParticle.of("FIREWORK").ifPresent(particle -> location.getWorld().spawnParticle(particle.get(), location, Math.min(12, getConfig().getInt("settings.max-particles", 24)), .25, .25, .25, .01));
        XParticle.of("CRIT").ifPresent(particle -> location.getWorld().spawnParticle(particle.get(), location, Math.min(8, getConfig().getInt("settings.max-particles", 24)), .35, .35, .35, .05));
    }

    public void decorateGhat(Location location) {
        XParticle.of("HAPPY_VILLAGER").ifPresent(particle -> location.getWorld().spawnParticle(particle.get(), location.clone().add(0, 1, 0), Math.min(24, getConfig().getInt("settings.max-particles", 24)), 1.5, .5, 1.5, .01));
    }

    public void announceChhath(String moment) {
        String message = configs.get("chhath.yml").getString("announcements." + moment, "&eChhath Puja " + moment + " celebration is beginning.");
        Bukkit.broadcastMessage(Text.color(configs.prefix() + message));
        for (Player player : Bukkit.getOnlinePlayers()) {
            Location ghat = getEventLocation("chhath");
            if (ghat != null && player.getWorld().equals(ghat.getWorld())) recordParticipation(player, FestivalType.CHHATH);
        }
        Location location = getEventLocation("chhath");
        if (location != null) decorateGhat(location);
        if (configs.get("chhath.yml").getBoolean("chhath.fireworks", true)) fireworks.start("chhath_show");
    }

    public ConfigManager configs() { return configs; }
    public FestivalManager festivals() { return festivals; }
    public FireworksManager fireworks() { return fireworks; }
    public FestivalItemService items() { return items; }
    public RewardManager rewards() { return rewards; }
    public GodModeManager godMode() { return godMode; }
    public FlagManager flags() { return flags; }
    public FestivalMenuListener menu() { return menu; }
    public NamespacedKey flagKey() { return flagKey; }
}