Player Utils
This Is A NeoForge mod for Minecraft 1.21.1 that adds utility commands for server administration.
介绍
Player Utils
A powerful administrative mod for NeoForge 1.21.1 that adds four essential commands for gameplay control.
✨ Features
- /choke – Force players to suffocate unless specific inventory conditions are met. Oxygen depletes rapidly and causes damage when empty. Conditions are optional.
- /health – Lock a player’s health to a fixed value (1–100) until conditions are met. Supports optional inventory conditions.
- /pvp – Disable a player’s ability to attack other players. Simple on/off toggle.
- /autosp – Automatically sets your spawnpoint to your death location when you die. Click the respawn button to respawn exactly where you died.
All states are persisted in each player’s NBT data, surviving server restarts and relogs.
📖 Command Reference
/choke
| Subcommand | Syntax | Description |
|————|——–|————-|
| start | /choke start <targets> [slotList] | Starts suffocating the target players. If slotList is omitted, the effect is unconditional (always active). |
| stop | /choke stop [targets] | Stops the effect. If no targets are given, affects the command sender. |
/health
| Subcommand | Syntax | Description |
|————|——–|————-|
| start | /health start <target> <health> [slotList] | Locks the target’s health to the given value (1–100). If slotList is omitted, the lock is unconditional. |
| stop | /health stop [target] | Releases the lock and restores max health to 20. |
/pvp
| Subcommand | Syntax | Description |
|————|——–|————-|
| start | /pvp start <targets> | Disables PvP for the targets (they cannot damage other players). |
| stop | /pvp stop [targets] | Re-enables PvP. |
/autosp
| Subcommand | Syntax | Description |
|————|——–|————-|
| start | /autosp start <targets> | Enables auto spawnpoint – upon death, the player’s spawnpoint is set to the death location. |
| stop | /autosp stop [targets] | Disables the feature. |
🧩 SlotList Format (for /choke and /health)
The slotList is an optional JSON array that defines conditions on specific inventory slots.
Each entry is an object with the slot name as key and an object of item IDs and required counts.
Slot names:
hotbar.0tohotbar.8–hotbarinventory.9toinventory.35–inventoryarmor.head,armor.chest,armor.legs,armor.feet–armoroffhand–offhand
Item format: "namespace:item" (e.g., "minecraft:diamond").
Count is optional; if omitted, any amount is accepted. Multiple items in one slot act as OR (any of them works).
Example:
[
{"hotbar.8": {"minecraft:bedrock": 1}},
{"armor.head": {"create:diving_helmet": 1, "create:netherite_diving_helmet": 1}},
{"inventory.32": {"minecraft:netherite_block": 32}}
]
This requires:
- Slot 8 (last hotbar slot) has at least 1 bedrock.
- Helmet slot has either a diving helmet or a netherite diving helmet.
- Inventory slot 32 has exactly 32 netherite blocks.
🔒 Permissions
All commands require OP level 2 (default for most server admins).
In singleplayer, enable cheats or use /op in a server environment.
📝 License
This mod is distributed under All Rights Reserved unless otherwise stated in the source code.
You may use it on your server, but redistribution or modification requires explicit permission from the author.
🙏 Acknowledgements
- NeoForge for the modding framework.
- All contributors and testers.
📞 Contact
Author: DogOfFurina
Issues & suggestions: GitHub Issues
常见问题
Player Utils 支持哪些 Minecraft 版本?
Player Utils 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。
Player Utils 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
评论
登录后评论和评分