TreasureCoffer  [1.20.1-1.21.5] a feature-rich loot crate plugin designed for ultimate customiza icon

TreasureCoffer [1.20.1-1.21.5] a feature-rich loot crate plugin designed for ultimate customiza -----

multiple draw currencies (keys, premium points, gold), single and multi-pull options, and a guarant



Add command rewards
Code (YAML):
# TreasureCoffer Update Notes

**Update Date
: May 21, 2025**

## New Feature: Command Reward System

We are excited to announce that TreasureCoffer plugin now supports command rewards! This brand new feature allows server administrators to set up special rewards that execute predefined commands with OP permissions when a player wins, instead of directly giving items.

### Features

- **Command Execution Rewards**
: Instead of giving items, the system executes specified commands when a player wins
- **Variable Support**
: ` %player%` in commands is automatically replaced with the winner's name
- **Space Handling**
: Use underscores `_` to represent spaces in commands, avoiding parameter parsing errors
- **Custom Icons**
: Use any item as the display icon for command rewards
- **Probability Control**
: Like regular item rewards, you can set the chance of winning

### How to Use

#### Adding Command Rewards

1. Hold an item in your hand (this item will be used as the display icon for the command reward )
2. Enter the command
:
  ```
   /tc addcmd <crate-id> <command> [chance ]
   ```

   - `<crate-id>` - The ID of the crate to add the reward to
   - `<command>` - The command to execute, using underscores instead of spaces, and ` %player%` to represent the winner
   - ` [chance ]` - Optional parameter to set the winning probability (default is 10 %)

#### Examples

```
/tc addcmd default eco_give_ %player%_10000 20
```

This command will execute `eco give PlayerName 10000` with OP permissions when a player wins, with a 20 % chance.

```
/tc addcmd vip lp_user_ %player%_parent_add_vip_7d 5
```

This command will execute `lp user PlayerName parent add vip 7d` with OP permissions when a player wins, with a 5 % chance.

### Important Notes

- Command rewards are executed with console (OP ) permissions, so ensure the commands are secure
- ` %player%` in commands is automatically replaced with the winner's name
- All underscores `_` in commands are automatically replaced with spaces
- Command rewards will use the item you were holding when adding the reward as the display icon in the GUI
- Command rewards can currently only be added to the normal reward pool, not the guaranteed pool

### Permission Node

- `treasurecoffer.admin.addcmd` - Allows adding command rewards

### Command List

| Command | Description |
| ---------| ------------- |
| `/tc addcmd <crate-id> <command> [chance ]` | Add a command reward to the specified crate |

---

Thank you for using the TreasureCoffer plugin! If you have any questions or suggestions, please feel free to contact us.

 
----------, May 21, 2025
Resource Information
Author:
----------
Total Downloads: 93
First Release: May 8, 2025
Last Update: May 22, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings