Minecraft Inventory Shuffle Mod
这是一个 Fabric 模组,根据分组及其选项来打乱玩家的物品栏。该模组支持单人游戏、集成/LAN 服务器以及专用服务器。
此模组按玩家逐个进行物品栏打乱;它不会在玩家之间交换/互换物品栏。
概述
该模组将玩家组织到命名分组中,每个分组拥有自己的一组物品栏打乱规则。当玩家加入某个分组时,其物品栏将根据该分组的选项进行打乱。每个分组可以拥有自己的打乱间隔,以及关于哪些物品栏部分需要被打乱的特定规则(主物品栏、快捷栏、选中槽位或副手)。
该模组提供了用于管理这些分组及其选项的命令。你可以创建、删除和重命名分组,向分组中添加或移除玩家,并配置各种打乱选项,例如间隔时间和哪些物品栏部分应包含在打乱范围内。所有分组数据和选项都会随世界自动保存,因此在服务器重启后依然保留。
快速入门
默认名为“default”的分组会在模组首次加载时自动创建。要开始打乱:
- 将玩家添加到组:
/invshuffle player add <groupName> <player>
- 检查组状态:
/invshuffle group status <groupName>(可选)
- 如有需要调整选项:
/invshuffle group options <groupName> [option] [value](可选)
命令
该模组通过命令进行管理。它添加了一个主命令 /invshuffle(或其别名 /shuffleinv),所有其他配置或信息命令均由此派生。所有命令都需要操作者权限(等级 4)。
注意: 在下方的命令语法中,尖括号 <angle brackets> 中的参数为必填项,而方括号 [square brackets] 中的参数为可选项。
组管理
/invshuffle group create <groupName>
使用默认选项创建新组。组名必须唯一。
/invshuffle group delete <groupName>
删除现有组并将其中的所有玩家移除。
/invshuffle group rename <oldGroupName> <newGroupName>
将现有组重命名为新名称。新名称必须唯一。
分组选项
/invshuffle group options <groupName> [option] [value]
如果未指定选项,则显示该分组的所有选项。如果仅指定了选项,则显示该特定选项的值。如果同时提供了选项和值,则将选项设置为指定的值。
/invshuffle group status [groupName]
如果未指定分组名称,则显示所有分组的列表。如果提供了分组名称,则显示该指定分组的信息。
玩家管理
/invshuffle player add <groupName> [players]
如果未指定玩家,则将自己添加到该组。如果提供了玩家列表,则将指定的玩家添加到该组。被添加的玩家必须在线。
/invshuffle player remove [playerName]
如果未指定玩家名称,则从当前所在的组中移除自己。如果提供了玩家名称,则将该玩家从其所在组中移除。即使玩家离线也能执行此操作。
实用命令
/invshuffle help
显示所有可用命令及其基本用法,包括指向模组文档的链接。
命令参数
<groupName>
组的名称
<oldGroupName>
需要重命名的组的名称
<newGroupName>
重命名时组的新名称
[playerName]
需要从组中移除的玩家名称
[players]
要添加到组中的一个或多个玩家
[option]
要修改的选项(enabled, interval, shuffleEmptySlots, shuffleInventory, shuffleHotbar, shuffleHand, shuffleOffhand)
[value]
选项的新值(布尔类型选项为 true/false,间隔选项为大于 0 的数字)
[groupName]
显示其状态信息的组名称
常见问题解答 (FAQ)
为什么我的物品栏没有被随机打乱?
- 不在任何组中 - 使用
/invshuffle player add <groupName> 将自己加入组。
- 组已禁用 - 使用
/invshuffle group options <groupName> enabled true 启用它。
- 未启用任何随机打乱选项 - 至少必须启用一个区域(物品栏、快捷栏等)。
- 间隔时间过长 - 如果间隔设置较高,随机打乱的频率会降低。
- 物品栏为空 - 没有物品就无法进行随机打乱。
为什么我的手部/副手物品没有被随机打乱?
shuffleHand 和 shuffleOffhand 选项的优先级高于 shuffleHotbar 选项。要将手部物品纳入随机池,请确保启用了这些选项。
请注意,通过正确的组合设置,您也可以仅随机打乱手部物品而不影响其他部分。
模组数据保存在哪里?
保存在服务器或存档根目录下的 inventory-shuffle.dat 文件中(NBT 格式,未压缩)。
为什么我无法将玩家添加到组中?
被添加的玩家必须在线(以便获取他们的 UUID)。您可以移除离线的玩家。
为什么我不能一次性移除多个玩家?
移除命令只接受一个名称,以支持按名称移除离线玩家。
此模组是否与其他模组和数据包兼容?
通常与不直接修改玩家物品栏的模组和数据包兼容。例如,它可以与 SharedInv 一起工作,但与其他内容的兼容性可能会有所不同。
说明
- 仅在没有存档文件时才会创建默认组。
- 请尝试调整组选项,默认值仅为随意设定。
Minecraft Inventory Shuffle Mod
This is a Fabric mod that shuffles players' inventories based on groups and those groups' options. This mod supports single-player, integrated/LAN servers, and dedicated servers.
This mod shuffles inventories on a per-player basis; it does not shuffle/swap inventories between players.
Overview
The mod organizes players into named groups, each with its own set of rules for inventory shuffling. When a player joins a group, their inventory will be shuffled according to that group's options. Each group can have its own shuffle interval and specific rules about which parts of the inventory to shuffle (main inventory, hotbar, selected slot, or offhand).
The mod provides commands to manage these groups and their options. You can create, delete, and rename groups, add or remove players from groups, and configure various shuffle options like intervals and which inventory sections to include in the shuffle. All group data and options are automatically saved with the world, so they persist between server restarts.
Quick Start
A default group named "default" is created automatically when the mod first loads. To start shuffling:
- Add players to a group:
/invshuffle player add <groupName> <player>
- Check group status:
/invshuffle group status <groupName> (optional)
- Adjust options if needed:
/invshuffle group options <groupName> [option] [value] (optional)
Commands
The mod is managed by commands. It adds a single command /invshuffle (or its alias /shuffleinv) from which all other configuration or information commands are derived. All commands require operator permissions (level 4).
Note: In the command syntax below, parameters in <angle brackets> are required, while parameters in [square brackets] are optional.
Group Management
/invshuffle group create <groupName>
Creates a new group with default options. The group name must be unique.
/invshuffle group delete <groupName>
Deletes an existing group and removes all players from it.
/invshuffle group rename <oldGroupName> <newGroupName>
Renames an existing group to a new name. The new name must be unique.
Group Options
/invshuffle group options <groupName> [option] [value]
Shows all options for the group if no option is specified. Shows the value of a specific option if only option is specified. Sets an option to the specified value if both option and value are provided.
/invshuffle group status [groupName]
Shows a list of all groups if no group name is specified. Shows information about the specified group if a group name is provided.
Player Management
/invshuffle player add <groupName> [players]
Adds yourself to the group if no players are specified. Adds the specified players to the group if players are provided. Players must be online to be added.
/invshuffle player remove [playerName]
Removes yourself from your current group if no player name is specified. Removes the specified player from their group if a player name is provided. Works even if the player is offline.
Utility Commands
/invshuffle help
Displays all available commands and their basic usage, including a link to the mod's documentation.
Command Parameters
<groupName>
Name of the group
<oldGroupName>
Name of the group to be renamed
<newGroupName>
New name for the group when renaming
[playerName]
Name of the player to remove from their group
[players]
One or more players to add to a group
[option]
Option to modify (enabled, interval, shuffleEmptySlots, shuffleInventory, shuffleHotbar, shuffleHand, shuffleOffhand)
[value]
New value for the option (true/false for boolean options, number > 0 for interval)
[groupName]
Name of the group to show status for
FAQ
Why isn't my inventory being shuffled?
- Not in a group - Add yourself with
/invshuffle player add <groupName>.
- Group disabled - Enable with
/invshuffle group options <groupName> enabled true.
- No shuffle options enabled - At least one section (inventory, hotbar, etc.) must be enabled.
- Long interval - If interval is high, shuffling occurs less frequently.
- Empty inventory - No items means nothing to shuffle.
Why aren't my hand/offhand items being shuffled?
shuffleHand and shuffleOffhand options have higher priority than shuffleHotbar option. To include hands in the shuffle pool, make sure these options are enabled.
Note that you can also shuffle only the hands and nothing else with the correct combination.
Where is the mod data saved?
In the server's or save's root folder as inventory-shuffle.dat (NBT format, uncompressed).
Why can't I add a player to a group?
Players must be online to be added (so we can get their UUID). You can remove offline players.
Why can't I remove multiple players at once?
The remove command accepts only one name to support removing offline players by name.
Is this mod compatible with other mods and datapacks?
Generally compatible with mods and datapacks that don't directly modify player inventories. Works with SharedInv for example but your experience may vary with other content.
Notes
- A default group is only created when no save file exists.
- Play around with the group options, the defaults are arbitrary.
评论 0
登录后参与评分
还没有评论,来抢沙发吧