Elytra

Create a Minecraft Java Edition server plugin compatible with Minecraft 1.21.11.

Automatic Reward System

  • Every 30 seconds → give every online player 1 Iron Ingot.
  • Every 1 minute → give every online player 1 Gold Ingot.
  • Every 5 minutes → give every online player 1 Diamond.
  • Rewards must be given automatically while players are online.
  • The system should run continuously 24/7.
  • Players should not need to use any command to receive rewards.

Configuration

Create a configurable "config.yml" where I can change:

  • Reward items
  • Reward amounts
  • Time intervals
  • Reward messages
  • Enable/disable individual rewards

Commands

Add:

  • "/rewards reload" — reload the configuration.
  • "/rewards status" — show the current reward timers/status.

Requirements

  • Compatible with Minecraft 1.21.11.
  • Lightweight and optimized to avoid server lag.
  • Handle server restarts and lag safely without giving duplicate rewards.
  • Send a simple message whenever a player receives a reward.
  • If a player's inventory is full, safely handle the item instead of deleting it.
  • Provide the complete source code, "plugin.yml", "config.yml", and installation/build instructions.
  • Use the correct Minecraft material names:

"IRON_INGOT", "GOLD_INGOT", "DIAMOND".

Kodari AI
KodariSep 13 at 4:41 am 1
AutoRewardSystem
A lightweight Minecraft Bukkit/Spigot plugin that automatically distributes rewards to online players at configurable intervals. The system runs continuously, granting Iron Ingots every 30 seconds, Gold Ingots every minute, and Diamonds every 5 minutes by default. All rewards, amounts, intervals, and messages are fully configurable via config.yml, with individual rewards able to be enabled or disabled. Commands include /rewards reload to refresh configuration and /rewards status to display current timers. The plugin safely handles full inventories by dropping items at the player's location, prevents duplicate rewards during server restarts through a persistent timestamp system, and is optimized for minimal server lag using a single scheduled task. Compatible with Minecraft 1.21.11 and built for Java 8+.
  1. Create the Gradle project and Paper plugin metadata for Minecraft 1.21.11.

  2. Implement configurable, lag-safe reward scheduling with safe handling of full inventories.

  3. Add /rewards reload and /rewards status.

  4. Add default configuration and installation/build instructions.

Created the complete AutomaticRewards Paper plugin project.

Includes:

  • Configurable iron, gold, and diamond rewards

  • 30-second, 1-minute, and 5-minute defaults

  • Enable/disable toggles, amounts, materials, intervals, and messages

  • Safe overflow handling by dropping items naturally

  • Lag-safe scheduling without catch-up duplicates

  • /rewards reload

  • /rewards status

  • Paper 1.21.11 and Java 21 Gradle setup

  • XSeries material compatibility

  • plugin.yml, config.yml, source code, and README.md with build/install instructions

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
9 424
src/main/java/com/kodari/autorewards/AutoRewardsPlugin.java
package com.kodari.autorewards;

import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class AutoRewardsPlugin extends JavaPlugin {

    private RewardManager rewardManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.rewardManager = new RewardManager(this);
        this.rewardManager.start();

        RewardCommand rewardCommand = new RewardCommand(this);
        PluginCommand command = getCommand("rewards");
        if (command == null) {
            getLogger().severe("The rewards command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        command.setExecutor(rewardCommand);
        command.setTabCompleter(rewardCommand);
    }

    @Override
    public void onDisable() {
        if (rewardManager != null) {
            rewardManager.stop();
        }
    }

    public RewardManager getRewardManager() {
        return rewardManager;
    }
}