CodeClaim

CodeClaim

A server-side Fabric mod for Minecraft 1.21.1 that allows players to redeem codes for rewards. No client mod required. No database required

by
24 Downloads
fabriceconomysocialtechnology
Rent Server with this Mod

Screenshots

CodeClaim Screenshot 1

About this Mod

CodeClaim

A server-side Fabric mod for Minecraft 1.21.1 that allows players to redeem codes for rewards.
No client mod required. No database required.

Minecraft
Fabric
Java
License
Server Side


Overview

CodeClaim lets server administrators create redeemable codes that reward players with any server command — give items, Pokemon, broadcast titles, and more. Each player can only redeem each code once, and each code can have a global usage limit. All data is stored in simple JSON files with no external database setup required.

Replace this with a description

Features

  • Any player can use /claim without operator permissions
  • Each player can only redeem each code once, enforced by UUID
  • Per-code global usage limit via max_uses
  • Set max_uses: -1 for unlimited redemptions
  • Execute any server command as a reward using %player% as a placeholder
  • All data auto-saves to a local JSON file
  • Hot-reload config and data without restarting the server
  • Server-side only — players do not need to install anything

Requirements

  • Minecraft 1.21.1
  • Fabric Loader 0.15.0 or later
  • Fabric API 0.102.0+1.21.1
  • Java 21

Installation

  1. Download codeclaim-1.0.0.jar from the Releases page
  2. Download all required dependencies: Fabric Language Kotlin, Fabric API
  3. Place the file in your server's mods/ folder alongside Fabric API
  4. Start the server — the config file will be automatically generated at config/codeclaim.json
  5. Edit the config to define your codes and rewards
  6. Use /claimadmin reload to apply any changes without restarting

Commands

Command Permission Description
/claim <code> All players Redeem a code and receive its reward
/claimadmin reload OP level 2 Reload config and player data from disk
/claimadmin info <code> OP level 2 View usage statistics for a code

Configuration

Config file location: config/codeclaim.json

{
  "messages": {
    "invalid_code":    "&cCode '&4{code}&c' does not exist!",
    "already_claimed": "&cYou have already redeemed '&4{code}&c'!",
    "max_uses":        "&cCode '&4{code}&c' has reached its usage limit!",
    "success":         "&aSuccessfully redeemed code '&2{code}&a'!",
    "reloaded":        "&aCodeClaim config reloaded!"
  },
  "codes": {
    "WELCOME2024": {
      "max_uses": -1,
      "commands": [
        "give %player% minecraft:bread 16"
      ]
    },
    "SHINY_EVENT": {
      "max_uses": 100,
      "commands": [
        "givepokemonother %player% moltres form=galarian",
        "title @a title {\"text\":\"A player claimed SHINY_EVENT!\",\"color\":\"gold\"}"
      ]
    },
    "GRAND_PRIZE": {
      "max_uses": 1,
      "commands": [
        "give %player% minecraft:netherite_ingot 3",
        "say %player% claimed the Grand Prize!"
      ]
    }
  }
}

Field Reference

Field Description
max_uses Maximum total redemptions across all players. -1 means unlimited.
commands List of server commands to execute when the code is successfully redeemed.
%player% Placeholder replaced with the redeeming player's username at runtime.
{code} Placeholder replaced with the entered code in message strings.
&a, &c Standard Minecraft color codes supported in all message fields.

Data Storage

Player redemption history is automatically saved to:

data/codeclaim_data.json

This file tracks which players have redeemed which codes, and the total usage count per code. Back up this file regularly to preserve redemption history across server migrations.


Building from Source

Requirements: JDK 21, Gradle 8.8 or later

git clone https://github.com/YOUR_USERNAME/codeclaim
cd codeclaim

# Linux / macOS
./gradlew build

# Windows
gradlew.bat build

The compiled jar will be output to build/libs/codeclaim-1.0.0.jar.


Compatibility

Mod Status
Cobblemon Compatible — use givepokemonother %player%
LuckPerms Compatible
Any server-side command mod Compatible

License

This project is licensed under the MIT License. See LICENSE for details.

Available Versions

CodeClaim 1.0.0beta
MC 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
April 27, 2026

How to Install CodeClaim on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).

3

Install Mod

Open the mod browser in the dashboard and search for "CodeClaim". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.11, 1.21.10, 1.21.9 (+8 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

CodeClaim server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.

Is CodeClaim compatible with fabric?

CodeClaim officially supports fabric for Minecraft 1.21.11, 1.21.10, 1.21.9. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with CodeClaim – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if CodeClaim consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install CodeClaim with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Required

Supported Versions

1.21.111.21.101.21.91.21.81.21.71.21.61.21.51.21.41.21.31.21.2+1 more