Create a complete, production-ready Minecraft plugin for Paper 1.21.x written in Java.
Plugin Name: AirDrop
The plugin must be optimized, asynchronous where appropriate, well-documented, and follow modern Paper API practices. It should compile without errors and be production-ready.
================================================== GENERAL ==================================================
- Automatically spawn an AirDrop every 4 hours.
- AirDrop remains active for 30 minutes.
- If unclaimed after 30 minutes, despawn automatically.
- After ending (claimed or expired), start a new 4-hour cooldown.
- Only ONE AirDrop can exist at a time.
- Save all timers and active AirDrop data.
- Restore active AirDrop after server restart.
- Spawn only in the Overworld.
- Spawn randomly between 10,000 and 20,000 blocks from world spawn.
- Randomize positive and negative X/Z coordinates.
- Find the highest safe solid block.
- Never spawn in:
- Water - Lava - Trees - Leaves - Inside caves - Inside blocks - Dangerous locations
- Retry until a valid location is found.
================================================== AIRDROP CHEST ==================================================
Spawn:
- Chest
- Lightning effect (visual only)
- Configurable particles
- Configurable sounds
Broadcast:
📦 AirDrop has landed!
Coordinates:
X: #### Z: ####
Use /airdrop coords to locate it.
================================================== REWARD SYSTEM ==================================================
Command:
/airdrop INVENTORY GUI
Requirements:
- 54-slot INVENTORY GUI
- Admin places rewards inside INVENTORY GUI.
- Rewards save permanently in a data file.
- Unlimited rewards.
When a player opens the AirDrop chest:
- Choose ONE random reward.
- Give reward.
- Broadcast winner.
- Remove AirDrop.
- Start 4-hour cooldown.
================================================== BOSS BAR ==================================================
Display to every online player.
Example:
📦 AirDrop • X: #### Z: #### • 29:58 Remaining
Requirements:
- Updates every second.
- Progress bar decreases over time.
- Hidden automatically after AirDrop ends.
================================================== COMMAND BLOCKER ==================================================
Protected radius:
100 blocks
Inside the radius:
Block ALL commands.
Allowed:
/airdrop coords /airdrop time
Players with permission:
airdrop.admin
bypass restriction.
Blocked message:
"You cannot use commands inside the AirDrop zone."
================================================== AIRDROP PROTECTION ==================================================
Create a protected radius of 6 blocks around the AirDrop.
Inside the protected area:
- Prevent block breaking.
- Prevent block placing.
- Prevent piston movement.
- Prevent TNT explosions.
- Prevent Creeper explosions.
- Prevent End Crystal explosions.
- Prevent Bed explosions.
- Prevent Respawn Anchor explosions.
- Prevent fire spread.
- Prevent fire ignition.
- Prevent water flow.
- Prevent lava flow.
- Prevent the AirDrop chest from being broken.
- Remove protection automatically when the AirDrop ends.
================================================== COMMANDS ==================================================
Player
/airdrop coords Shows current AirDrop coordinates.
/airdrop time Shows remaining active time or next AirDrop countdown.
================================================== ADMIN COMMANDS ==================================================
Permission:
airdrop.admin
Commands:
/airdrop INVENTORY GUI Open reward editor INVENTORY GUI.
/airdrop forcestart Immediately spawn an AirDrop.
/airdrop forcestop Immediately end the current AirDrop and begin the 4-hour cooldown.
/airdrop reload Reload config.yml and data files.
/airdrop tp Teleport to the active AirDrop.
/airdrop info Show:
- Status
- Coordinates
- Time remaining
- Cooldown
- Reward count
================================================== INVENTORY GUI ==================================================
Reward INVENTORY GUI:
- 54 slots
- Drag & drop items
- Save automatically on close
- Supports every item including custom NBT items
- No item duplication exploits
================================================== CONFIG ==================================================
Everything configurable:
- Spawn cooldown
- Active duration
- Spawn radius
- Protected radius
- Command block radius
- BossBar title
- BossBar color
- BossBar style
- Messages
- Broadcasts
- Sounds
- Particles
- Lightning
- World name
- Permissions
================================================== DATA STORAGE ==================================================
Store separately:
config.yml messages.yml rewards.yml data.yml
Save:
- Active AirDrop
- Timers
- Rewards
- Coordinates
- Cooldown
- Active status
================================================== VISUAL EFFECTS ==================================================
Configurable:
- Lightning
- Beacon beam
- Smoke particles
- Flame particles
- Totem particles
- Firework on spawn
- Firework when claimed
================================================== OPTIMIZATION ==================================================
- No memory leaks.
- Use scheduled tasks efficiently.
- No unnecessary repeating tasks.
- Async file saving where safe.
- Proper listener registration.
- Modular class structure.
- Follow Java 21 and modern Paper API.
- Clean code with comments.
================================================== PROJECT STRUCTURE ==================================================
Provide the complete Maven project including:
- pom.xml
- plugin.yml
- All Java source files
- config.yml
- messages.yml
- rewards.yml
- data.yml
- README.md
================================================== COMPATIBILITY ==================================================
- Paper 1.21.x
- Java 21
- No external dependencies except the Paper API.
- No Skript.
- No NMS.
- No ProtocolLib.
- No Vault.
The final output should be a complete, production-ready Paper plugin with no placeholders, no TODOs, and code ready to compile and use.
The generation was stopped before any content could be produced.
Create a complete, production-ready Minecraft plugin for Paper 1.21.x to 1.21.11 written in Java.
Plugin Name: AirDrop
The plugin must be optimized, asynchronous where appropriate, well-documented, and follow modern Paper API practices. The final result must compile without errors and be ready for production use.
================================================== GENERAL ==================================================
- Automatically spawn an AirDrop every 4 hours.
- Only ONE AirDrop can exist at a time.
- Save all timers and active AirDrop data.
- Restore the active AirDrop after a server restart.
- Spawn only in the Overworld.
- Spawn randomly between 10,000 and 20,000 blocks from world spawn.
- Randomize both positive and negative X/Z coordinates.
- Find the highest safe solid block.
- Never spawn inside water, lava, caves, trees, leaves, or inside blocks.
- Retry until a safe location is found.
- Everything must be configurable.
================================================== AIRDROP PHASES ==================================================
Phase 1 - Air Drop Animation
- Spawn the AirDrop in the sky.
- Default spawn height configurable (Y=120).
- The AirDrop slowly falls from the sky.
- Configurable falling speed.
- Falling animation must be smooth and optimized.
- Show particles while falling.
- Play configurable sounds while falling.
When the AirDrop reaches the ground:
- Play landing animation.
- Visual lightning only.
- Firework.
- Landing particles.
- Landing sounds.
- Build the ritual structure.
- Spawn the AirDrop chest.
================================================== LOCKED PHASE ==================================================
Duration: 30 minutes
During this phase:
- Chest cannot be opened.
- Display message:
"The AirDrop is still unlocking."
BossBar:
📦 AirDrop Unlocks In: 29:59
Broadcast when spawned:
📦 AirDrop has landed!
Coordinates:
X: #### Z: ####
Use /airdrop coords
================================================== CLAIMABLE PHASE ==================================================
After 30 minutes:
Broadcast:
"The AirDrop has been unlocked!"
BossBar:
📦 AirDrop Available X: #### Z: #### Expires In: 29:59
First player opening the chest:
- Receives ONE random reward.
- Broadcast winner.
- Firework.
- Remove AirDrop.
- Remove ritual.
- Start 4-hour cooldown.
================================================== EXPIRE PHASE ==================================================
After 60 minutes from spawn:
If nobody claimed it:
- Remove chest.
- Remove ritual.
- Remove BossBar.
- Broadcast:
"The AirDrop has expired."
Start the next 4-hour cooldown.
================================================== RITUAL STRUCTURE ==================================================
Theme:
Ancient Obsidian Ritual
Generate automatically.
Materials:
- Obsidian
- Crying Obsidian
- Blackstone
- Polished Blackstone
- Soul Lantern
- Soul Fire
- Candles
Size configurable.
The structure must look like an ancient ritual altar.
The chest sits in the center.
================================================== STRUCTURE PROTECTION ==================================================
The generated ritual structure is temporary.
While the AirDrop exists:
- Generated blocks cannot be broken.
- Generated blocks cannot explode.
- TNT cannot damage them.
- Creepers cannot damage them.
- End Crystals cannot damage them.
- Beds cannot damage them.
- Respawn Anchors cannot damage them.
- Pistons cannot move them.
- Water cannot flow through them.
- Lava cannot flow through them.
- Fire cannot burn them.
- Fire cannot spread.
- The AirDrop chest cannot be broken.
When the AirDrop ends:
- Remove every generated block.
- Restore the terrain exactly as it was before spawning.
================================================== REWARD SYSTEM ==================================================
Command:
/airdrop INVENTORY GUI
Requirements:
- 54-slot INVENTORY GUI
- Drag and drop support
- Unlimited rewards
- Save automatically
- Save to rewards.yml
- Support custom NBT items
- No duplication exploits
When claimed:
- Choose ONE random reward.
- Give reward.
- Remove AirDrop.
================================================== BOSS BAR ==================================================
Display to every player.
Locked:
📦 Unlocks In: 29:59
Unlocked:
📦 AirDrop X: #### Z: #### Expires In: 29:59
Updates every second.
Progress decreases smoothly.
Automatically disappears.
================================================== COMMAND BLOCKER ==================================================
Radius:
100 blocks
Inside radius:
Block every command.
Allowed:
/airdrop coords
/airdrop time
Players with:
airdrop.admin
ignore this restriction.
Blocked message configurable.
================================================== AIRDROP PROTECTION ==================================================
Radius configurable.
Prevent:
- Block break
- Block place
- Chest breaking
- Explosions
- Fire
- Lava
- Water
- Pistons
================================================== COMMANDS ==================================================
Player
/airdrop coords
Shows coordinates.
--------------------------------------------------
/airdrop time
Shows:
Current phase.
Remaining unlock time.
Remaining expire time.
Remaining cooldown.
================================================== ADMIN COMMANDS ==================================================
Permission:
airdrop.admin
Commands:
/airdrop INVENTORY GUI
/airdrop forcestart
/airdrop forcestop
/airdrop reload
/airdrop tp
/airdrop info
Info displays:
- Status
- Current phase
- Coordinates
- Unlock timer
- Expire timer
- Cooldown
- Reward count
================================================== CONFIG ==================================================
Everything configurable.
Including:
Auto spawn
Cooldown
Unlock time
Expire time
Spawn radius
Drop height
Drop speed
World
Particles
Sounds
Fireworks
Lightning
BossBar
Messages
Permissions
Protection radius
Command block radius
Structure size
Structure materials
================================================== FILES ==================================================
config.yml
messages.yml
rewards.yml
data.yml
================================================== DATA ==================================================
Save:
Current AirDrop
Coordinates
Current phase
Cooldown
Unlock timer
Expire timer
Rewards
Structure blocks
Original replaced blocks
================================================== OPTIMIZATION ==================================================
- No memory leaks
- Async file saving where safe
- Efficient scheduled tasks
- Modular architecture
- Clean Java 21 code
- Well documented
- Proper error handling
- Fully reloadable
- Production ready
================================================== PROJECT ==================================================
Generate the complete Maven project including:
- pom.xml
- plugin.yml
- Every Java class
- config.yml
- messages.yml
- rewards.yml
- data.yml
- README.md
=================================
The final output must be a complete, production-ready plugin with no placeholders, no TODOs, and code that compiles successfully.
completeThe Maven project has been created with the plugin source, commands, listeners, reward editor, lifecycle management, ritual generation and restoration, persistence files, configuration, plugin metadata, and README documentation.
must support 1.21.11 and java 25
Update the Maven compiler target from Java 21 to Java 25.
Keep Paper API pinned to 1.21.11 and correct the generated metadata files so the project remains buildable.
Update the README requirements to document Paper 1.21.11 and Java 25.
The Java 25 and Paper 1.21.11 targets are now set. I also found literal Markdown code fences in the generated YAML resources, which would make the plugin fail to load; I’m removing those so the project remains valid YAML and production-buildable.
Updated for:
Paper
1.21.11Java
25Maven compiler release
25maven-compiler-pluginrelease25README requirements
Also removed invalid Markdown code fences from all YAML resources so they load correctly at runtime:
config.ymlmessages.ymlrewards.ymldata.yml
The project now targets Java 25 and Paper 1.21.11.
add discord hook. ping id: enable true or false config announce the player wo claimed the reward from chest
Add a configurable Discord webhook announcement with optional role/user ID ping.
Send the claim announcement after the first successful chest claim, including the player and reward.
Update configuration, dependency metadata, and README usage details.
[Generation stopped]
add discord hook. ping role id: enable true or false config announce the player wo claimed the reward from chest
Add a Java 25 asynchronous Discord webhook service with configurable enable flags, URL, role ID, and claim announcement template.
Integrate it into the first successful AirDrop claim without affecting gameplay if Discord is unavailable.
Document the configuration and add the required webhook settings.
The claim hook is being added as a non-blocking Java HTTP client integration. Discord failures will only be logged and will not cancel or delay the in-game reward claim.
Implemented the Discord claim webhook integration.
Added configuration
config.yml now supports:
webhook:
enabled: false
url: ""
claim:
enabled: true
ping-role: false
role-id: ""
message: "📦 **{player}** claimed the AirDrop reward: **{reward}** x{amount}!"
webhook.enabled: globally enables or disables Discord integration.webhook.url: Discord webhook URL.webhook.claim.enabled: enables or disables claim announcements.webhook.claim.ping-role: enables role mentions.webhook.claim.role-id: Discord role ID to mention.Supported placeholders:
{player}{reward}{amount}
Integration
Sends an announcement after the first successful chest claim.
Uses Java 25 virtual threads and
HttpClient.Discord requests run asynchronously and do not block gameplay.
Invalid URLs, HTTP failures, and network errors are logged safely.
Role mentions use Discord
allowed_mentionsrestrictions.Webhook resources are closed when the plugin disables.
/airdrop reloadreloads the webhook configuration.README documentation was updated.
The project remains configured for Paper 1.21.11 and Java 25.
where to get discord hook url
To get a Discord webhook URL:
Open Discord and go to your server.
Open Server Settings → Integrations.
Select Webhooks.
Click New Webhook.
Choose the channel where announcements should appear.
Give it a name, then click Copy Webhook URL.
Paste that URL into your plugin configuration’s webhook URL setting.
Keep the URL private—anyone with it can send messages to that channel. If it is exposed, use Regenerate Webhook URL in Discord.
make discord bot token and channel adder instead of this hook like in given channel it show status coords if drop and timer
Replace the webhook transport with a Discord bot-token/channel configuration.
Add bot status updates showing AirDrop state, coordinates, and countdown timer.
Keep updates asynchronous and document the new setup/configuration.
[Generation stopped]
make discord bot token and channel adder instead of this hook like in given channel it show status coords if drop and timer
Replace the webhook settings/service with a Discord bot-token and channel-ID integration.
Publish AirDrop status, coordinates, drop state, and countdown updates to the configured Discord channel.
Wire lifecycle cleanup and document the new configuration without affecting in-game drops.
[Generation stopped]
make discord bot token and channel adder instead of this hook like in given channel it show status coords if drop and timer and also players can use basic cmds of /airdrop time /airdrop coords through discord
Replace the webhook integration with a Discord bot-token/channel configuration.
Publish drop status, coordinates, and countdown updates to the configured Discord channel.
Add Discord
/airdrop timeand/airdrop coordscommands, then update configuration and documentation.
The current integration is an HTTP webhook. I’m replacing it with a JDA Discord bot service first; status updates and Discord commands will be added against that service next.
Transport: adding a shaded JDA bot service and removing the webhook-only HTTP path.
Status: the bot will maintain one message in the configured channel with phase, coordinates, and the relevant timer.
Commands: registering Discord
/airdrop timeand/airdrop coordsslash subcommands with the same live state as the in-game commands.
The webhook class now contains the bot implementation; I’m correcting its filename/type alignment and wiring the live manager state into the Discord command/status API before the final configuration/docs pass.The bot service and manager status API are now aligned. I’m applying the final file rename and lifecycle/configuration cleanup so the project compiles with the new class name and the bot starts after the AirDrop state is initialized.
Implemented the Discord bot integration.
Configuration
discord:
enabled: false
bot-token: ""
channel-id: ""
update-seconds: 30
claim:
enabled: true
message: "📦 **{player}** claimed the AirDrop reward: **{reward}** x{amount}!"
Added
Replaced the Discord webhook with a bot-token integration using JDA.
Configurable Discord channel ID.
Live status message showing:
AirDrop phase
World and coordinates
Unlock, expiration, or cooldown timer
Claim announcements in Discord.
Discord slash commands:
/airdrop time/airdrop coords
Bot shutdown handling.
JDA dependency bundled into the plugin JAR.
README documentation updated.
Still targets Paper
1.21.11and Java25.
The Discord bot must have View Channel, Send Messages, Use Slash Commands, and Read Message History permissions in the configured channel.
package com.kodari.airdrop;
import com.kodari.airdrop.command.AirDropCommand;
import com.kodari.airdrop.command.AirDropTabCompleter;
import com.kodari.airdrop.listener.AirDropListener;
import com.kodari.airdrop.reward.RewardManager;
import com.kodari.airdrop.service.DataManager;
import com.kodari.airdrop.service.MessageService;
import com.kodari.airdrop.service.DiscordBotService;
import com.kodari.airdrop.structure.RitualManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class AirDropPlugin extends JavaPlugin {
private AirDropManager airDropManager;
private RewardManager rewardManager;
private MessageService messageService;
private DiscordBotService discordService;
@Override
public void onEnable() {
saveDefaultConfig();
saveResource("messages.yml", false);
saveResource("rewards.yml", false);
saveResource("data.yml", false);
messageService = new MessageService(this);
DataManager dataManager = new DataManager(this);
rewardManager = new RewardManager(this, messageService);
RitualManager ritualManager = new RitualManager(this);
DiscordBotService discordService = new DiscordBotService(this);
this.discordService = discordService;
airDropManager = new AirDropManager(this, messageService, dataManager, rewardManager, ritualManager, discordService);
Bukkit.getPluginManager().registerEvents(
new AirDropListener(airDropManager, rewardManager, messageService), this);
AirDropCommand command = new AirDropCommand(airDropManager, rewardManager, messageService);
if (getCommand("airdrop") != null) {
getCommand("airdrop").setExecutor(command);
getCommand("airdrop").setTabCompleter(new AirDropTabCompleter());
}
airDropManager.start();
discordService.start(airDropManager);
getLogger().info("AirDrop enabled.");
}
@Override
public void onDisable() {
if (airDropManager != null) {
airDropManager.shutdown();
}
if (discordService != null) {
discordService.shutdown();
}
getLogger().info("AirDrop disabled.");
}
}