more trade admin functionality, item/tag/mod blacklists, player blocks (can't use trade), trade timeouts
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
43
README.md
43
README.md
@@ -15,7 +15,9 @@ Players can request a trade, review both offers in a shared GUI, accept once to
|
||||
- Warning if items are removed/modified
|
||||
- Inventory-safe finalization: nothing changes until safety and security checks pass and the trade succeeds
|
||||
- Configurable trade safety checks to prevent dangerous mid-combat or mid-movement trading
|
||||
- Configurable per-player request cooldowns
|
||||
- Per-player trade toggles and ignore list support
|
||||
- Admin-controlled player and item trade blacklists, with config defaults and live commands
|
||||
- File-based trade audit log for server operators
|
||||
|
||||
## Player Usage
|
||||
@@ -72,6 +74,23 @@ If a player reduces or removes items from an offer:
|
||||
/trade ignorelist
|
||||
```
|
||||
|
||||
### Admin commands
|
||||
|
||||
Server operators can manage persistent live blacklists with:
|
||||
|
||||
```mcfunction
|
||||
/trade admin playerblock add <player|uuid>
|
||||
/trade admin playerblock remove <player|uuid>
|
||||
/trade admin playerblock list
|
||||
/trade admin itemblock add item <namespace:item>
|
||||
/trade admin itemblock remove item <namespace:item>
|
||||
/trade admin itemblock add tag <namespace:tag>
|
||||
/trade admin itemblock remove tag <namespace:tag>
|
||||
/trade admin itemblock add mod <modid>
|
||||
/trade admin itemblock remove mod <modid>
|
||||
/trade admin itemblock list
|
||||
```
|
||||
|
||||
### Command behavior
|
||||
|
||||
- `/trade <player>` sends a trade request
|
||||
@@ -135,6 +154,10 @@ Server config values live under the `trade` section.
|
||||
- default: `30`
|
||||
- number of seconds before a pending trade request expires
|
||||
|
||||
- `requestCooldownSeconds`
|
||||
- default: `5`
|
||||
- number of seconds a player must wait before sending another trade request
|
||||
|
||||
### Debug
|
||||
|
||||
- `enableDebugFeatures`
|
||||
@@ -186,6 +209,26 @@ Server config values live under the `trade` section.
|
||||
- `requireSameDimension`
|
||||
- default: `true`
|
||||
|
||||
### Admin blacklists
|
||||
|
||||
- `adminDisabledPlayerUuids`
|
||||
- default: `[]`
|
||||
- UUIDs of players who cannot use the trade system at all
|
||||
|
||||
- `adminBlacklistedItemIds`
|
||||
- default: command blocks, command block minecarts, barriers, bedrock, end portal blocks/frames, structure blocks, jigsaws, lights, and spawners
|
||||
- exact item ids that cannot be traded, like `minecraft:diamond`
|
||||
|
||||
- `adminBlacklistedItemTags`
|
||||
- default: `[]`
|
||||
- item tags that cannot be traded, like `minecraft:logs`
|
||||
|
||||
- `adminBlacklistedMods`
|
||||
- default: `[]`
|
||||
- mod namespaces that cannot be traded, like `minecraft`
|
||||
|
||||
Config blacklist entries are treated as defaults. Live admin commands add and remove separate saved entries that persist across restarts.
|
||||
|
||||
## Audit Log
|
||||
|
||||
The mod writes a trade audit log to:
|
||||
|
||||
Reference in New Issue
Block a user