
重新定义玩家背包
功能特性
- 通过多种设置重构背包系统,营造出真正的 RPG 感觉!
- 完全控制物品拾取、物品整理和物品创建!
- 禁用/锁定不需要的背包槽位!
- 拾取的物品会自动传递到下一个允许的槽位!
- 为槽位分配物品并将其加入黑名单或白名单,从而控制和限制其可能包含的内容!
- 将槽位定义为“物品垃圾桶”,放入其中的所有物品都会被删除!
- 将槽位定义为“槽位切换器”,点击时切换两个不同槽位中的物品!(适用于一键切换武器)
- 无法从锁定/不允许的槽位移动物品,也无法向其中移动物品!
- 无法从禁用的槽位丢弃物品!
- 自定义 /get 命令,其行为类似于默认的 /give 命令,但现在会跳过不允许使用的槽位!
- 自定义消息,当某个槽位不允许该物品或物品无法被拾取时,通知你的玩家!
- 通过详细且易于使用的配置文件进行完全配置,你可以启用或禁用所需的功能!
工作原理
假设你想让你的 Minecraft 服务器更具真实感,对玩家携带装满沉重战利品(往往超过自身重量数倍)的背包感到厌烦。你想要做出改变,而这里就带来了这种改变!
例如,你可以限制玩家的背包每次只能携带一把剑。这可以通过内置的配置文件来实现,你可以在其中定义 36 个不同背包槽位的行为。对于每个独立的背包槽位,你可以添加一个物品列表。这些物品现在可以被列入黑名单(即除了列表中的物品外,其他所有物品都可以放入该槽位),或者被列入白名单(即只有列出的物品才能放入该槽位)。
如果你的玩家背包还是显得有点大?你甚至可以完全禁止某个槽位的任何用途,使得没有任何物品可以移动到这个槽位中!无论是槽位被锁定,还是试图放入的物品不被允许——受限制的物品无论如何都不会进入不需要的区域。
配置说明
带注释的配置文件:config.yml
理解槽位网格
配置文件非常直观。首先,你可以更改一些通用设置,但大多数情况下保持默认即可。在下面你会找到 36 组不同的参数块,从“0”到“35”,每个数字代表背包系统中对应的槽位。

填充列表
根据你想要实现的效果,你可以将物品列表设置为黑名单或白名单。你需要为每个允许/禁止的物品使用一行。始终使用默认格式:ID:MetaData
大多数物品没有附加信息,因此它们的元数据值为零。有些物品,如原木或染料,具有多个子类型,用于定义颜色或类型。在这种情况下,你需要通过提交元数据值来指定你的需求。例如,剑和镐具有不断变化的耐久度。如果你只是将 272.0(石剑)添加到你的白名单中,那么只有完全修复的石剑才会被包含在内。如果你想包含所有可能的子类型和耐久度,请使用通配符 *。通过在点号后放置 * 来实现(示例:272.*)。
如果你不知道确切的物品 ID,可以使用下面的链接,或者在手持物品时使用 /ivitem 命令。你将获得一个适合放入配置文件的值,包括耐久度!
你可以在此处获取物品 ID(方块和物品):物品 ID 列表
请记住,如果你想要一个完全正常工作的白名单,还需要将空气(0.*)添加到槽位中。
帮助,我的配置不起作用
如果你删除了配置文件的某些部分,或在编辑时使用空格代替制表符,配置文件将无效,插件最终也会崩溃!请仅修改 true/false 值。你也可以在 “items:” 列表中添加或删除值。
插件本身是正常的,你只需要正确设置即可。升级到新版本也可能导致你的配置文件失效,因为某些内容可能已经更改。为了确保安全更新,请访问此页面的文件部分并点击最新版本页。那里列出了对配置文件所做的任何更改,只需手动检查差异并进行更正即可。如果你的配置文件似乎已损坏,请重新安装插件并将旧值添加到新生成的配置文件中。
你还可以尝试使用 YAML Phraser 来检查 config.yml 中的格式错误。
命令与权限
/ivreload
重载插件
/ivitem
将在手中持有的物品的 ID.DURABILITY 打印到聊天栏中,格式适合配置文件。
/get <item | item:data> [amount | player] [player]
这看起来可能有点令人困惑,但实际上比默认的 /give 命令更方便,后者例如总是要求输入玩家名称,即使你是接收物品的人也是如此。
第一个参数 <item | item:data> 表示你想要获得的物品。它可以是一个 ID,也可以是一个附带了元数据(Metadata)的 ID,两者之间用冒号分隔。
- 示例:
- /get 17 => 给你自己 1x 原木
- /get log => 给你自己 1x 原木
- /get 17:3 => 给你自己 1x 丛林原木
第二个参数现在可以是你要获得/给予的物品数量,也可以是你要将物品给予的玩家名称。如果你只输入用户名,则默认数量为 1。
- 示例:
- /get 17 30 => 给你自己 30x 原木
- /get log 30 => 给你自己 30x 原木
- /get 17:3 30 => 给你自己 30x 丛林原木
- /get 17 badeye => 给玩家(此处为:badeye)1x 原木
- /get log badeye => 给玩家(此处为:badeye)1x 原木
- /get 17:3 badeye => 给玩家(此处为:badeye)1x 丛林原木
第三个参数仅在第二个参数未使用用户名参数而是使用了物品数量时才相关。
- 示例:
- /get 17 30 badeye => 给玩家(此处为:badeye)30x 原木
- /get log 30 badeye => 给玩家(此处为:badeye)30x 原木
- /get 17:3 30 badeye => 给玩家(此处为:badeye)30x 丛林原木
已知问题
- Shift 键点击物品时,该物品会短暂地“幽灵般”回到其原始位置。这并非严重问题,只是视觉效果不够完美。这是由 Bukkit API 引起的,我无法修复。
- /get 命令不检查创造模式
- 通过 Shift 键点击穿戴盔甲的功能尚不可用
即将推出的功能
- 特定物品的负重效果 => 移动速度降低
- 合成栏管理
- 通过自定义 GUI 编辑游戏内物品栏限制 -> 不再需要配置文件来配置槽位
- 多世界支持

Redefining Player Inventories
Features
- Create a true RPG feeling by remodeling the inventory system through various settings!
- Full control over item pickups, item sorting and item creation!
- Disable/Lock unwanted inventory slots!
- Picked up items are getting forwarded to the next allowed slot!
- Assign items to a slot and blacklist or whitelist them, controlling and restricting its possible contents!
- Define slots as item-bins, deleting all items put in!
- Define slots as slot-switchers, switching the items of two different slots when clicked on! (useful for one-click weapon switching)
- Moving items from/into locked/not allowed slots is not possible!
- Dropping items from disabled slots is not possible!
- Custom /get command which behaves similar to the default /give, now skipping un-allowed slots!
- Custom messages, informing your players when a slot is not allowed for that item or if an item cannot be picked up!
- Fully configurable though detailed and easy-to-use configuration files, disable and enable the features you need!
How it works
Let's assume you want some realism on your Minecraft server, annoyed by players carrying around an inventory full of heavy loot, often multiple times their own weight. You want a change. This change is being brought here!
For instance, you could restrict your players inventories to only carry one sword at a time. It can be done through the included configuration file, in which you can define the behavior of each of the 36 different inventory slots. For each individual inventory slot, you can add items to a list. These items can now either be blacklisted (i.e. every other item than those in the list goes into the slot), or whitelisted (i.e. only the items listed fit into the slot).
Your players inventory is still a bit too big? You can even block a slot from any kind of usage, allowing NO items to be moved into that slot at all! Whether a slot is locked or the item trying to be placed into it is not allowed - Restricted items wont make their way into unwanted areas, no matter what.
Configuration
Config File with explanations: config.yml
Understanding the Slot Grid
The config file is very straight forward. First you are able to change some general settings, but for the most part just leave them on default. Underneath you find 36 different blocks of arguments, starting with "0" up to "35", while each number indicates the slot it is referring to in the inventory system.

Filling the Lists
Depending on what you want to achieve, you can either make the itemlist a blacklist or a whitelist. You need one row for each item you want to allow/forbid. Always use the default formatting: ID:MetaData
Most items don't have additional information, making their metadata value a zero. Some items, like log or dye, have multiple sub-types, defining color and/or type. In that case, you need to specify your needs by submitting the metadata value. Swords and pickaxes for instance have a constantly changing durability. If you just add 272.0 (stone sword) to your whitelist, only a fully repaired stone sword is included. If you want to include all possible sub types and durabilities, use the wildcard *. You do that by placing a * after the dot (example: 272.*).
If you don't know the exact Item ID, you can use the link below or use the command /ivitem while holding the item in your hand. You are going to get a suitable value ready to place inside the config, including durability!
You can get the item ID's (for blocks and items) here: Item ID list
Remember, if you want to have a fully working whitelist, also add air to the slot (0.*).
Help, my config doesn't work
The config will not work and the plugin will eventually break if you delete parts of it, or if you use whitespaces instead of tabs while editing! Please only modify true/false values. You can also add and delete values inside the "items:" lists.
The plugin works, you just have to get the setup right. Updating to a newer version may break your config file as well, some things might have changed. To make sure you can update safely, go to the files section on this page and click on the newest version. Any changes made to the config are listed there, just manually check for differences and correct them. If your config seems to be broken, reinstall the plugin and add your old values to the freshly generated configuration file.
You can also try to use the YAML Phraser, to check for formatting errors inside the config.yml.
Commands and permissions
/ivreload
Reloads the plugin
/ivitem
Prints ID.DURABILITY of the item currently hold in hand into the chat, suitable formatting the config file.
/get <item | item:data> [amount | player] [player]
This may seem a bit confusing, but it is actually way more handy than the default /give command, which, for instance, always asks to enter a player name, even if you are the one receiving the item..
The first argument <item | item:data> stands for the item you want to have. It can either be an ID, or an ID with Metadata attached to it, separated through a colon.
- Examples:
- /get 17 => gives 1x log to yourself
- /get log => gives 1x log to yourself
- /get 17:3 => gives 1x jungle log to yourself
The second argument can now either be the amount of items you want to have/give, or the name of the player you want to give something to. If you only enter a username, the amount will be one.
- Examples:
- /get 17 30 => gives 30x log to yourself
- /get log 30 => gives 30x log to yourself
- /get 17:3 30 => gives 30x jungle log to yourself
- /get 17 badeye => gives 1x log to a player (here: badeye)
- /get log badeye => gives 1x log to a player (here: badeye)
- /get 17:3 badeye => gives 1x jungle log to a player (here: badeye)
The third argument is only relevant when the second argument hasn't already used the username parameter but the item amount instead.
- Examples:
- /get 17 30 badeye => gives 30x log to a player (here: badeye)
- /get log 30 badeye => gives 30x log to a player (here: badeye)
- /get 17:3 30 badeye => gives 30x jungle log to a player (here: badeye)
Bugs
- Shift clicking an item is 'ghosting' it to its original destination for a brief moment. This is not a big deal, it just doesn't look as fancy as it could look. It is caused by the bukkit API and cannot be fixed on my end.
- /get doesnt check for creative mode
- Equiping armor through shift clicking doesn't work yet
Upcoming Features
- Carry weight for specific items => slowness
- Crafting slot management
- In-game inventory restriction editing through a custom gui -> config wont be needed anymore for the slot configuration
- MultiWorld support
评论 0
登录后参与评分
还没有评论,来抢沙发吧