Sangeeta Kumari

Create a Minecraft Java Edition server plugin called Rainbow SMP specifically for Minecraft 1.21.11.

First Join Reward

When a player joins the server for the first time ever, automatically give them:

  • 1 Mace
  • 5 Diamonds

The reward must be given only once per player. Rejoining the server must not give the reward again.

Death System

When a player dies:

  • The player must lose everything in their inventory.
  • Their Mace, Diamonds, armor, weapons, tools, and all other items must be lost.
  • The items should drop at the death location so another player can pick them up.
  • After respawning, the player must receive nothing automatically.

Configuration

Create a "config.yml" that allows the server owner to configure:

  • First-join reward items
  • Diamond amount
  • Mace amount
  • Whether items drop on death or are permanently deleted
  • Enable/disable the first-join reward

Compatibility

  • Minecraft Java Edition 1.21.11
  • Make the plugin specifically compatible with the 1.21.11 server API
  • Support Paper, Spigot, and Purpur if possible.
  • Use a clean and lightweight implementation.
  • Avoid unnecessary dependencies.

Important

Make sure the plugin does not accidentally give rewards to existing players when they reconnect or restart the server.

Provide:

  1. Complete source code
  2. "plugin.yml"
  3. "config.yml"
  4. All required project/build files
  5. Instructions for compiling the plugin
  6. Instructions for installing the resulting ".jar" into the server's "plugins" folder

The final plugin should be ready to compile and use on a Minecraft 1.21.11 Rainbow SMP server.

Kodari AI
KodariSep 20 at 7:45 am 1
RainbowSMPRewards
A lightweight Minecraft 1.21.11 Spigot/Paper plugin that grants first-join rewards (Mace and Diamonds) to new players and implements a death system where players lose all inventory items, which drop at death location for others to collect. Features a configurable config.yml for reward items, amounts, drop behavior, and feature toggles. Uses PlayerJoinEvent and PlayerDeathEvent with persistent storage to ensure rewards are given only once per player, even across server restarts.
  1. Create a Java 21 Gradle project targeting the Paper 1.21.11 API while using only Bukkit/Paper APIs for Spigot/Purpur compatibility.

  2. Add a first-join listener that relies on hasPlayedBefore() so rewards are never repeated after reconnects or restarts.

  3. Add configurable death handling for either normal item drops or permanent inventory deletion.

  4. Add plugin.yml, config.yml, and build/install instructions.

Created the complete Rainbow SMP plugin project.

Included:

  • Java 21 Gradle build configuration

  • Paper 1.21.11 API dependency

  • Paper, Spigot, and Purpur-compatible Bukkit API implementation

  • Configurable first-join rewards

  • Default reward:

    • 1 Mace

    • 5 Diamonds

  • Rewards only given when Player#hasPlayedBefore() is false

  • Configurable death behavior:

    • Drop all items at the death location

    • Permanently delete inventory, armor, and off-hand items

  • plugin.yml

  • config.yml

  • README.md with build and installation instructions

Compile with:

Shell
gradle build

The resulting plugin will be located at:

Plain Text
build/libs/rainbow-smp-1.0.0.jar

Copy that JAR into the server’s:

Plain Text
plugins/

The plugin does not include unnecessary dependencies.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
7 194
src/main/java/com/kodari/rainbowsmp/RainbowSmpPlugin.java
package com.kodari.rainbowsmp;

import org.bukkit.plugin.java.JavaPlugin;

public final class RainbowSmpPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new RainbowSmpListener(this), this);
    }
}