mythicaonline

Create a ReferralSystem for a minecraft server, modern and lightweight referral plugin designed to reward players for inviting new users to your server.

Encouraging players to bring their friends and earn rewards in return.

The system tracks invited players, validates referrals fairly, and allows full control over rewards and conditions. for a paper 26.2 MC server, name the plugin MythicaRAF

Kodari AI
KodariOct 9 at 3:50 am 1
MythicaRAF
MythicaRAF is a modern, lightweight referral system plugin for Paper 26.2 Minecraft servers. It rewards players for inviting new users by tracking referrals, validating them fairly, and granting customizable rewards. The plugin features a referral code system, automatic tracking of invited players, configurable reward conditions, and full administrative control over rewards and eligibility. It includes a user-friendly command interface for generating and sharing referral codes, viewing referral status, and claiming rewards. Administrators can manage referrals, adjust reward tiers, and monitor system performance through intuitive commands. The plugin ensures fair validation by preventing self-referrals and duplicate claims, while offering flexible configuration options for reward types, quantities, and conditions. MythicaRAF is designed to be performant, reliable, and easily integrated into any server environment, fostering community growth and player engagement through incentivized invitations.
  1. Create the Paper 26.2 plugin scaffold and default referral/reward configuration.

  2. Implement fair first-join claims, playtime validation, rewards, player stats, and admin reload.

  3. Register commands and listeners in MythicaRAF.

Created MythicaRAF for Paper 26.2 with /refer, /referrals, and /raf reload|stats. New players can claim a referrer within the configurable 24-hour window; rewards are issued after 30 minutes of tracked playtime by default. Referral limits and reward commands are configurable in config.yml.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 520
src/main/java/com/mythica/raf/MythicaRAF.java
package com.mythica.raf;

import org.bukkit.plugin.java.JavaPlugin;

public final class MythicaRAF extends JavaPlugin {
    private ReferralManager referralManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        referralManager = new ReferralManager(this);

        getServer().getPluginManager().registerEvents(new ReferralListener(referralManager), this);
        getServer().getScheduler().runTaskTimer(this, referralManager::updateOnlineReferrals, 1200L, 1200L);

        getCommand("refer").setExecutor(new ReferCommand(referralManager));
        getCommand("refer").setTabCompleter(new ReferCommand(referralManager));
        getCommand("referrals").setExecutor(new ReferralsCommand(referralManager));
        getCommand("mythicaraf").setExecutor(new AdminCommand(this, referralManager));
        getCommand("mythicaraf").setTabCompleter(new AdminCommand(this, referralManager));
    }

    @Override
    public void onDisable() {
        if (referralManager != null) {
            referralManager.shutdown();
        }
    }
}