hPotionStack
hPotionStack 是一款轻量级插件,允许药水在背包中以及作为掉落物在地面上堆叠。
该插件支持普通药水、喷溅药水和滞留药水。每种药水类型都可以分别设置背包堆叠和地面物品堆叠的选项,包括自定义堆叠上限和生成延迟。
功能
- 背包内药水堆叠
- 地面上药水物品堆叠
- 支持
POTION
- 支持
SPLASH_POTION
- 支持
LINGERING_POTION
- 每种药水类型独立设置
- 独立的背包和地面堆叠上限
- 可配置的地面物品堆叠前等待延迟
- 可配置的允许的背包类型
- 背包堆叠权限检查
- 自定义消息
- 自定义动作
- 重载命令
- 背包类型调试命令
- 十六进制颜色支持
堆叠机制
hPotionStack 适用于三种药水物品类型:
POTION
SPLASH_POTION
LINGERING_POTION
当启用背包堆叠时,插件会检查在允许的背包类型内的药水点击操作,并将相似的药水合并至配置的上限数量。
当地面堆叠启用时,插件会在配置的时间延迟后检查生成的药水物品,并将附近相似的药水物品合并至配置的上限数量。
背包
背包堆叠可以全局启用,也可以为每种药水类型单独启用。
玩家需要在背包内进行药水堆叠操作时拥有以下权限:
hpotionstack.stack
如果玩家没有此权限,插件可以执行来自以下部分的动作:
actions.noPermsInventory
默认允许的背包类型:
CRAFTING
ENDER_CHEST
BARREL
SHULKER_BOX
CHEST
地面物品
地面物品堆叠可以全局启用,也可以为每种药水类型单独启用。
当药水物品在地面生成时,插件会等待配置的延迟时间,然后尝试将其与附近相似的药水物品合并。
地面堆叠行为通过以下配置项控制:
settings.enable.itemSpawn
settings.stackSettings.<type>.itemSpawn.enable
settings.stackSettings.<type>.itemSpawn.maxStack
settings.stackSettings.<type>.itemSpawn.delay
配置文件
默认配置示例:
settings:
prefix: "&7[#FDBE00Server&7]"
debug: true
enable:
inventory: true
itemSpawn: true
stackSettings:
potion:
inventory:
enable: true
maxStack: 3
itemSpawn:
enable: true
maxStack: 5
delay: 4
splashPotion:
inventory:
enable: true
maxStack: 64
itemSpawn:
enable: true
maxStack: 64
delay: 4
lingeringPotion:
inventory:
enable: true
maxStack: 48
itemSpawn:
enable: true
maxStack: 48
delay: 4
inventories:
- "CRAFTING"
- "ENDER_CHEST"
- "BARREL"
- "SHULKER_BOX"
- "CHEST"
动作
插件包含用于反馈背包堆叠结果的动作文本部分。
actions:
noPermsInventory:
- "[Message] {prefix} You do not have permission to stack potions in inventories!"
onStackInventory:
- "[Sound] ENTITY_VILLAGER_YES"
- "[Message] {prefix} Potions have been stacked!"
命令
| 命令 |
描述 |
/hpotionstack |
显示帮助信息 |
/hpotionstack reload |
重新加载配置 |
/hpotionstack inventory <player> |
显示玩家当前打开的背包类型 |
库存命令在配置允许的背包类型列表时非常有用。
权限
| 权限 |
描述 |
hpotionstack.admin |
访问管理命令 |
hpotionstack.stack |
允许在背包内堆叠药水 |
地面物品堆叠会根据配置自动工作。
要求
- Minecraft 1.16 或更高版本
- Spigot、Paper 或兼容的服务端分支
可选的软依赖:
安装
- 将
hPotionStack.jar 放入服务器的 plugins 文件夹中。
- 重启服务器。
- 打开生成的配置文件。
- 配置药水堆叠上限和启用的模块。
- 如果希望玩家能够在背包中堆叠药水,请给予他们
hpotionstack.stack 权限。
- 编辑配置后使用
/hpotionstack reload 重新加载。
配置文件位置:
plugins/hPotionStack/config.yml
注意事项
- 只有相似的药水才会被堆叠在一起。
- 背包堆叠需要
hpotionstack.stack 权限。
- 地面物品堆叠由配置文件控制。
- 每种药水类型都可以拥有独立的背包和地面堆叠上限。
- 可以配置允许的背包类型以防止意外的堆叠行为。
- 使用
/hpotionstack inventory <player> 检查玩家当前打开的背包类型。
hPotionStack
hPotionStack is a lightweight plugin that allows potions to stack in inventories and as dropped items on the ground.
The plugin supports regular potions, splash potions and lingering potions. Each potion type can have separate settings for inventory stacking and ground item stacking, including custom stack limits and spawn delays.
Features
- Inventory potion stacking
- Ground item potion stacking
- Support for
POTION
- Support for
SPLASH_POTION
- Support for
LINGERING_POTION
- Separate settings per potion type
- Separate inventory and ground stack limits
- Configurable delay before ground item stacking
- Configurable allowed inventory types
- Permission check for inventory stacking
- Custom messages
- Custom actions
- Reload command
- Inventory type debug command
- Hex color support
Stacking
hPotionStack works with three potion item types:
POTION
SPLASH_POTION
LINGERING_POTION
When inventory stacking is enabled, the plugin checks potion clicks inside allowed inventory types and combines similar potions up to the configured limit.
When ground stacking is enabled, the plugin checks spawned potion items after a configurable delay and merges similar nearby potion items up to the configured limit.
Inventory
Inventory stacking can be enabled globally and separately for every potion type.
Players need this permission to stack potions inside inventories:
hpotionstack.stack
If the player does not have permission, the plugin can run actions from:
actions.noPermsInventory
Default allowed inventory types:
CRAFTING
ENDER_CHEST
BARREL
SHULKER_BOX
CHEST
Ground Items
Ground item stacking can be enabled globally and separately for every potion type.
When a potion item spawns on the ground, the plugin waits for the configured delay and then tries to merge it with similar nearby potion items.
The ground stacking behavior is controlled through:
settings.enable.itemSpawn
settings.stackSettings.<type>.itemSpawn.enable
settings.stackSettings.<type>.itemSpawn.maxStack
settings.stackSettings.<type>.itemSpawn.delay
Config
Default configuration example:
settings:
prefix: "&7[#FDBE00Server&7]"
debug: true
enable:
inventory: true
itemSpawn: true
stackSettings:
potion:
inventory:
enable: true
maxStack: 3
itemSpawn:
enable: true
maxStack: 5
delay: 4
splashPotion:
inventory:
enable: true
maxStack: 64
itemSpawn:
enable: true
maxStack: 64
delay: 4
lingeringPotion:
inventory:
enable: true
maxStack: 48
itemSpawn:
enable: true
maxStack: 48
delay: 4
inventories:
- "CRAFTING"
- "ENDER_CHEST"
- "BARREL"
- "SHULKER_BOX"
- "CHEST"
Actions
The plugin includes action sections for inventory stacking feedback.
actions:
noPermsInventory:
- "[Message] {prefix} You do not have permission to stack potions in inventories!"
onStackInventory:
- "[Sound] ENTITY_VILLAGER_YES"
- "[Message] {prefix} Potions have been stacked!"
Commands
| Command |
Description |
/hpotionstack |
Shows the help message |
/hpotionstack reload |
Reloads the configuration |
/hpotionstack inventory <player> |
Shows the open inventory type of a player |
The inventory command is useful when configuring the allowed inventory type list.
Permissions
| Permission |
Description |
hpotionstack.admin |
Access to administrative commands |
hpotionstack.stack |
Allows potion stacking inside inventories |
Ground item stacking works automatically according to the configuration.
Requirements
- Minecraft 1.16 or newer
- Spigot, Paper or a compatible server fork
Optional soft dependencies:
Install
- Place
hPotionStack.jar into your server's plugins folder.
- Restart the server.
- Open the generated configuration file.
- Configure potion stack limits and enabled modules.
- Give players
hpotionstack.stack if they should be able to stack potions in inventories.
- Use
/hpotionstack reload after editing the configuration.
Configuration file:
plugins/hPotionStack/config.yml
Notes
- Only similar potions are stacked together.
- Inventory stacking requires
hpotionstack.stack.
- Ground item stacking is controlled by the configuration.
- Every potion type can have its own inventory and ground stack limit.
- Allowed inventory types can be configured to prevent unwanted stacking behavior.
- Use
/hpotionstack inventory <player> to check the type of the inventory a player currently has open.
评论 0
登录后参与评分
还没有评论,来抢沙发吧