Reward
⚙️ Reward Configuration Guide
This section explains how to configure an individual reward in TheRewards plugin using a .yml
file.
Each reward is defined in its own YAML file located in the plugin's reward folder. Below is a full breakdown of the configuration fields.
🔖 Basic Information
name
Unique identifier for the reward.
countdown
Time in seconds before the player can claim the reward again.
oneTime
If true
, the reward can only be claimed once per player.
update
If true
, the GUI item will refresh automatically when the reward state changes.
requiredSlots
Amount of free inventory slots needed to claim the reward. Use -1
to ignore.
🔐 Permission Requirement
🎨 GUI Position
slot
Inventory slot number (or multiple separated by commas: 1,2,3
).
page
GUI page where the reward appears.
✅ Requirements (Conditions)
Requirements define whether the player can claim the reward. All comparisons are done using PlaceholderAPI values.
📌 Available Conditions
==
Equals (number only)
"%vault_eco_balance%" == 1000
!=
Not equal (number and text)
"%player_name%" != "Steve"
>=
Greater than or equal (number only)
"%statistic_hours_played%" >= 10
>
Greater than (number only)
"%player_level%" > 30
<=
Less than or equal (number only)
"%player_level%" <= 5
<
Less than (number only)
"%vault_eco_balance%" < 100
=
Equals (text only)
"%luckperms_primary_group%" = "vip"
<-
Contains (text only)
"%player_name%" <- "xShyo"
|-
Starts with (text only)
%player_name%" |- "B_"
-|
Ends with (text only)
%player_name%" -| "_"
📌 Example Block
🛠️ Actions on Claim
Actions define what happens when a reward is claimed. You can mix as many as you want. They run in order.
📦 List of All Available Actions
[command]
Executes a command as console
[command] eco give {player} 500
[player]
Executes a command as player
[player] /spawn
[message]
Sends a private message
[message] &aReward claimed!
[broadcast]
Sends a global message
[broadcast] &e{player} claimed a reward!
[sound]
Plays a sound to the player
[sound] ENTITY_PLAYER_LEVELUP;1.0f;1.0f
[title]
Displays a title
[title] &aCLAIMED;&fReward received;10;20;10
[actionbar]
Shows actionbar message
[actionbar] &eYou got 10 coins!
[close]
Closes the player's inventory
[close]
[minimessage]
Sends MiniMessage to the player
[minimessage] <green>You claimed a reward!</green>
[minibroadcast]
Broadcasts MiniMessage globally
[minibroadcast] <gold>{player}</gold> claimed <green>VIP reward</green>
[chance=x]
Sets a probability for the following action(s)
[chance=50] [command] say Lucky player!
[log]
It will display a message on the server backend.
[log] server log
[firework]
Launches a firework with the desired configuration
[firework] colors=RED,BLUE;fade=WHITE;type=BALL_LARGE;power=2;flicker=true;trail=true
[permission]
Adds permissions to the player (Requires Vault)
[permission] server.permission
[!permission]
Remove player permissions (Requires Vault)
[!permission] server.permission
[opcommand]
Execute a command like op (Not recommended to use)
[opcommand] gamemode creative
📝 Use
{player}
to reference the player's name. ⏱ You can delay actions using<delay=ticks>
(e.g. 20 ticks = 1 second).
📌 Example Block
📦 GUI Item States
Each item state shows differently based on the reward status:
available
When reward is claimable
incountdown
When waiting for cooldown
permission
When player lacks permission
onetime
When the reward is already claimed (one-time)
locked
When player doesn’t meet requirements
Each section includes:
You can use placeholders like
{state}
,{requirements}
,{countdown}
in lore.
📄 Example Template
Here’s a basic reward structure to copy:
Need help building conditions or actions? Join our Discord or open an issue!
Last updated