Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Ndaily Rewards Plugin Wiki › Guides › Execute Commands When Players Claim Rewards

Execute Commands When Players Claim Rewards

Setting Up Command Rewards

Command execution allows you to automate actions when players claim daily rewards. In your reward configuration, set the reward type to command and define the command to execute.

Use standard Minecraft command syntax:

`

give @p diamond 5

broadcast {player} claimed their daily reward!

tp @p spawn

`

The @p selector targets the claiming player. You can also use {player} as a placeholder for the player's username in commands.

Multiple Commands Per Reward

To execute several commands for a single reward, list them sequentially in your configuration. The plugin processes them in order, allowing you to:

  • Give items
  • Send messages
  • Teleport players
  • Trigger other plugin functions

Combining Commands with Messages

You can pair command execution with custom messages. When a player claims a reward, the command runs silently while your formatted message displays to them. This creates a seamless reward experience without cluttering chat with command output.

Reload the plugin and test by claiming a reward to ensure commands execute without errors.