truls_10

Create me a minecraft plugin that lets me customize lootdrops. I want to customize the loot inside the drops, the amount of drops that spawn, different structures, messages with the structure names etc.

Kodari AI
KodariFeb 13 at 3:44 pm 14,091 (v2)

I’ll create a comprehensive loot drop customization plugin for you.

CustomLootDrops
A highly customizable loot drop system allowing server administrators to create unique loot tables with configurable items, drop amounts, visual structures, and custom messages. Features include multiple loot table configurations, spawn commands, interactive drop claiming, weight-based item distribution, and structure customization. Perfect for events, rewards, and enhancing gameplay with randomly spawned treasure.

Perfect! I’ve created CustomLootDrops - a comprehensive loot drop system for Minecraft with the following features:

Features Created:

Multiple Loot Tables

  • Pre-configured: Common, Rare, and Legendary tables

  • Each with customizable items, weights, and spawn amounts

  • Fully configurable in loot-tables.yml

Customizable Drop Structures

  • Visual customization (armor stand appearance, glow effects)

  • Custom names and colors

  • Particle effects (villager hearts, portal, flames, etc.)

  • Sound effects on spawn

  • Items displayed on armor stand helmet

Drop Spawning System

  • Command: /lootdrop spawn <table> [amount]

  • Spawns 1-10 drops at player location with random offsets

  • Configurable broadcast messages (nearby or global)

  • Weight-based item selection

  • Randomized loot amounts within configured ranges

Interactive Claiming

  • Right-click drops to claim

  • Items automatically added to inventory

  • Overflow items drop on ground

  • Shows each item received with color-coded messages

  • One-time claim per drop

Admin Commands

  • /lootdrop spawn <table> [amount] - Spawn drops

  • /lootdrop reload - Reload all configurations

  • /lootdrop list - View available loot tables

Configuration Files

  1. config.yml - Main settings (particles, sounds, broadcast, lifetime)

  2. loot-tables.yml - Define all loot tables, items, weights

  3. messages.yml - All messages with placeholders

Additional Features

  • Auto-cleanup of expired drops (configurable lifetime)

  • Prevents drop manipulation/breaking

  • XSeries for cross-version compatibility

  • Lombok for clean code

  • Fully permission-based

Commands:

  • /lootdrop spawn common 3 - Spawn 3 common drops

  • /lootdrop spawn legendary 1 - Spawn 1 legendary drop

  • /lootdrop reload - Reload configs

  • /lootdrop list - List all available tables

The system is fully functional and ready to use! You can easily add more loot tables in the config and customize everything from particle effects to item weights.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
16 963
src/main/java/com/customlootdrops/CustomLootDrops.java
package com.customlootdrops;

import com.customlootdrops.command.LootDropCommand;
import com.customlootdrops.listener.DropInteractListener;
import com.customlootdrops.manager.ConfigManager;
import com.customlootdrops.manager.LootManager;
import com.customlootdrops.manager.MessageManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CustomLootDrops extends JavaPlugin {
    private ConfigManager configManager;
    private MessageManager messageManager;
    private LootManager lootManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.configManager.loadConfigs();

        this.messageManager = new MessageManager(this);
        this.lootManager = new LootManager(this);

        getCommand("lootdrop").setExecutor(new LootDropCommand(this));
        Bukkit.getPluginManager().registerEvents(new DropInteractListener(this), this);

        this.lootManager.startCleanupTask();

        getLogger().info("CustomLootDrops has been enabled!");
    }

    @Override
    public void onDisable() {
        if (this.lootManager != null) {
            this.lootManager.removeAllDrops();
        }
        getLogger().info("CustomLootDrops has been disabled!");
    }
}