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:
- Complete source code
- "plugin.yml"
- "config.yml"
- All required project/build files
- Instructions for compiling the plugin
- 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.
Create a Java 21 Gradle project targeting the Paper 1.21.11 API while using only Bukkit/Paper APIs for Spigot/Purpur compatibility.
Add a first-join listener that relies on
hasPlayedBefore()so rewards are never repeated after reconnects or restarts.Add configurable death handling for either normal item drops or permanent inventory deletion.
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 falseConfigurable death behavior:
Drop all items at the death location
Permanently delete inventory, armor, and off-hand items
plugin.ymlconfig.ymlREADME.mdwith build and installation instructions
Compile with:
gradle build
The resulting plugin will be located at:
build/libs/rainbow-smp-1.0.0.jar
Copy that JAR into the server’s:
plugins/
The plugin does not include unnecessary dependencies.
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);
}
}