Playtime Rewards
Minecraft 1.20.1 Forge - Execute commands based on player's active playtime
介绍
PlayTimeRewards
A server-side Minecraft Forge mod that rewards players and/or executes commands for time spent on your server.
Players earn configurable item and command rewards at playtime milestones. One-time rewards, repeating hourly bonuses, random loot, AFK pause, and a pending-claim queue for full inventories are included.
Side: Server-only (clients can join without the mod)
Features
- Tracks online playtime per player and persists it with the world
- One-time milestone rewards and repeating rewards every N hours
- Give all listed items, or pick one random item
- Run all listed console commands, or pick one random command
- Optional NBT on reward items
- Pending rewards if the player’s inventory is full (
/rewards claim) - Optional AFK detection that pauses playtime
- Configurable messages with
&color codes - Server-side only: no client install required
Installation
- Install Minecraft Forge for 1.20.1. Forge 47.3.0 or newer is recommended.
- Drop the PlayTimeRewards jar into the server’s
modsfolder. - Start the server once. Default configs are created at
config/playtimerewards/. - Edit the configs and run
/rewards reload, or restart the server.
Players do not need this mod on their client.
Commands
| Command | Permission | Description |
|—|—|—|
| /rewards | Everyone | Show your playtime and pending rewards |
| /rewards claim | Everyone | Claim pending rewards that could not fit in your inventory |
| /rewards check <player> | OP level 2 | View another player’s playtime and pending reward count |
| /rewards reload | OP level 2 | Reload settings.json and rewards.json |
| /rewards reset <player> | OP level 3 | Delete a player’s stored playtime and reward progress |
Configuration
Configs live in config/playtimerewards/ and are generated on first launch.
settings.json
| Option | Default | Description |
|—|—|—|
| playtimeCheckIntervalTicks | 20 | How often playtime is counted; minimum 20 ticks |
| rewardCheckIntervalTicks | 1200 | How often reward eligibility is checked; minimum 200 ticks |
| broadcastRewards | true | Broadcast when a reward is granted |
| broadcastMessage | &a{player} received: {reward}! | Server-wide reward message |
| rewardMessage | &6You earned the {reward} reward for {hours}h of playtime! | Message sent to the rewarded player |
| pendingRewardMessage | &eInventory full! Use /rewards claim to collect. | Shown when items cannot fit |
| afkEnabled | false | Pause playtime when a player is idle |
| afkTimeoutMinutes | 5 | Idle time before AFK starts |
| afkMessage | &7Playtime paused -- you are AFK. | Sent when AFK starts |
| afkReturnMessage | &aWelcome back! Playtime resumed. | Sent when AFK ends |
| saveIntervalMinutes | 5 | How often player data is saved |
| debug | false | Extra logging |
Message placeholders: {player}, {reward}, {hours}, {minutes}. AFK is reset by movement, looking around, breaking/placing blocks, interacting, or opening a container.
rewards.json
Each tier defines a reward:
name: unique display namerequiredHours: threshold in hoursrepeating:falsefor one-time milestone,truefor every N hoursitems: array of{ "item": "minecraft:diamond", "count": 1, "nbt": "" }randomItem: iftrue, give 1 random item from the listcommands: array of console command strings ({player}is replaced)randomCommand: iftrue, run 1 random command from the list
Default tiers: Starter Kit (1h), Hourly Random Bonus (every 1h), Veteran Reward (10h).
{
"tiers": [
{
"name": "Starter Kit",
"requiredHours": 1.0,
"repeating": false,
"randomItem": false,
"randomCommand": false,
"items": [
{ "item": "minecraft:iron_ingot", "count": 16, "nbt": "" },
{ "item": "minecraft:bread", "count": 32, "nbt": "" }
],
"commands": [
"say {player} has played for 1 hour and received a Starter Kit!"
]
}
]
}
Storage
Per-world data is saved to world/playerdata/playtimerewards_playerdata.json.
License
MIT License (c) 2026 Flurben.
常见问题
Playtime Rewards 支持哪些 Minecraft 版本?
Playtime Rewards 支持 Minecraft Java 版 1.20.1–1.20.6,共 6 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Playtime Rewards 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
评论
登录后评论和评分