bart_048

Dayrewards

Kodari AI
KodariApr 26 at 10:01 am 12,647 (v2)

I’ll create a daily rewards plugin with streak tracking and configurable rewards.

DayRewards
A feature-rich daily rewards plugin that incentivizes player retention. Players claim rewards once per day with increasing value based on login streaks. Features include a calendar-style GUI, configurable rewards per day (items, money, commands), streak bonus multipliers, grace periods for missed days, and automatic notifications. Supports multiple reward types, cycle limits, and Vault economy integration. Admins can reset player streaks and view claim statistics.

Now I’ll create a complete daily rewards plugin with streak tracking, configurable rewards, and a GUI system.

Perfect! I’ve created a complete daily rewards plugin with the following features:

Core Features:

  • Daily reward claiming system with cooldown (24 hours by default)

  • Streak tracking that increases with consecutive daily logins

  • Configurable grace period to prevent immediate streak loss

  • Automatic streak cycling (resets to day 1 after max streak)

Reward System:

  • Three reward types: ITEM, MONEY (Vault), and COMMAND

  • Multiple rewards per day support

  • Enchantment support for items

  • 7 days of pre-configured rewards (fully customizable)

GUI System:

  • Calendar-style display showing all reward days

  • Visual indicators (claimed/available/locked)

  • Real-time streak and cooldown information

  • Claim button with status display

  • Customizable layout and appearance

Commands:

  • /dayrewards - Opens the rewards GUI

  • /dayrewards reset <player> - Admin command to reset player streak

  • /dayrewards reload - Reload configuration

Additional Features:

  • Join notifications for available rewards

  • Optional auto-open GUI on join

  • Persistent player data (YAML storage)

  • Vault economy integration

  • XSeries for cross-version compatibility (1.8-1.21+)

  • Permission-based access control

  • Auto-save system every 5 minutes

The plugin is fully configured with example rewards ranging from iron ingots on day 1 to a mega reward with dragon heads and elytra on day 7!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
12 1,036
src/main/java/com/dayrewards/plugin/DayRewards.java
package com.dayrewards.plugin;

import com.dayrewards.plugin.command.DayRewardsCommand;
import com.dayrewards.plugin.listener.JoinListener;
import com.dayrewards.plugin.manager.ConfigManager;
import com.dayrewards.plugin.manager.PlayerDataManager;
import com.dayrewards.plugin.manager.RewardManager;
import lombok.Getter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class DayRewards extends JavaPlugin {
    
    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private RewardManager rewardManager;
    private Economy economy;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.rewardManager = new RewardManager(this);
        
        if (getServer().getPluginManager().getPlugin("Vault") != null) {
            setupEconomy();
        }
        
        getCommand("dayrewards").setExecutor(new DayRewardsCommand(this));
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);
        
        playerDataManager.loadAllData();
        
        getLogger().info("DayRewards has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAllData();
        }
        getLogger().info("DayRewards has been disabled!");
    }
    
    private void setupEconomy() {
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp != null) {
            economy = rsp.getProvider();
            getLogger().info("Vault economy hooked successfully!");
        }
    }
    
    public boolean hasEconomy() {
        return economy != null;
    }
}