Paradox Refferal
About
Paradox Refferal is a lightweight Paper 1.21.x referral-code plugin built for simple, clean usage:
- Players can redeem exactly one referral code.
- Admins can create/remove codes, view stats, and manage reward commands.
- Includes a styled in-chat leaderboard and Discord webhook logging via embeds.
Features
Referral Codes
- Create codes with
/refferal create <code> - Redeem codes with
/refferal <code> - Case-insensitive matching (e.g.
PARADOX,paradox,Paradoxall match the same code) - One-time redemption per player (global; a player can only ever redeem one code total)
- Tracks total uses per code
Reward Commands
- Each code can have multiple reward commands.
- Commands run from the console, not as the player.
- Add commands:
/refferal edit command <code> <command...> - Placeholders:
<user>: player name<player>: player name<uuid>: player UUID
Example:
/refferal edit command paradox give <user> diamond_block 5
Leaderboard (Chat)
/refferal leaderboard- Shows all codes sorted by uses (descending)
- Uses a red/black “top list” style similar to the provided screenshot
- Configurable number of lines via
leaderboard.maxLines
Discord Webhook (Embeds)
- Sends a Discord webhook embed on successful code redemption.
- Embed fields:
- Player
- UUID
- Code
- Configurable via
config.yml
GUI Editor (/refferal edit)
/refferal editopens a clean inventory menu (admin-only).- Main menu:
- Background: black stained glass panes
- Each code is a Filled Map item with:
- Name = the referral code
- Lore = uses + number of commands
- Click to open details
- Close button: barrier
- Details menu:
- Book: statistics (code, uses, created-by if available)
- Command Block: shows reward commands (first few) and placeholder info
- Arrow: back
- Redstone Block: delete (Shift-click to confirm)
Installation
- Put
ParadoxRefferal.jarinto your serverplugins/folder. - Start the server once to generate the config.
- Edit
plugins/ParadoxRefferal/config.yml. - Restart the server (recommended over
/reload).
Commands
/refferal <code>- Redeems a code (players only)/refferal leaderboard- Shows referral leaderboard (players + console)/refferal create <code>- Creates a referral code (admin)/refferal remove <code>- Removes a referral code (admin)/refferal edit- Opens the GUI editor (admin, players only)/refferal edit command <code> <command...>- Adds a reward command to a code (admin)
Permissions
paradoxrefferal.admin- Default: OP
- Grants access to: create, remove, edit (GUI + command editing)
Configuration (config.yml)
File location:
plugins/ParadoxRefferal/config.yml
discord:
enabled: true
webhookUrl: "https://discord.com/api/webhooks/..."
username: "ParadoxRefferal"
avatarUrl: ""
leaderboard:
maxLines: 10
Discord
discord.enabled: Enables/disables webhook logging.discord.webhookUrl: Discord webhook URL.discord.username: Webhook username override.discord.avatarUrl: Optional avatar URL (empty = Discord default).
Leaderboard
leaderboard.maxLines: How many codes are shown on/refferal leaderboard.
Storage
Data is stored in:
plugins/ParadoxRefferal/data.yml
Includes:
- All codes (uses, createdBy, createdAt, reward commands)
- Player redemption lock (who already redeemed a code)
Troubleshooting
- The plugin doesn’t load
- Ensure you are running Paper 1.21.x on Java 21.
- Check console for errors on startup.
- No Discord messages
- Verify
discord.enabled: trueand the webhook URL is correct. - Ensure the server can reach Discord (firewall / hosting network rules).
- Verify
- A player can’t redeem a second code
- This is intended behavior: each player can redeem only one code total.
Created by Paradox