RandomSlotDrop
RandomSlotDrop 是一款 Minecraft 插件,允许玩家在死亡时保留部分物品栏。它引入了一个可配置的机制,仅随机掉落一定百分比的物品栏格子中的物品,从而减少因死亡后失去所有物品而产生的挫败感,提升玩家体验。

功能概览
-
可配置的物品栏格子掉落
仅在玩家死亡时,随机选择特定百分比的物品栏格子进行掉落。
例如,假设 dropSlotsPercent 设置为 10%。由于玩家总共有 41 个物品栏格子(36 个通用格子 + 4 个护甲格子 + 副手格子),插件会计算 41 的 10%,结果约为 4 个随机格子被选中用于掉落物品。如果玩家只有 10 个格子中有物品,那么最多可能有 4 个格子的物品掉落;但如果随机选中的格子是空的,则可能没有任何物品掉落。
-
部分堆叠掉落
对于每个被选中且包含多个物品的格子,插件会在配置的范围内(从 stackDropPercentMin% 到 stackDropPercentMax%)随机选择一个部分堆叠数量进行掉落。如果你将最小值和最大值都设置为 100,则该堆叠的所有物品总是会掉落。
-
在旁观者模式下掉落完整物品栏
可选功能:如果玩家死亡并在随后切换到旁观者模式,其整个物品栏会自动掉落(通过 spectatorFullDrop 配置)。
插件命令
| 命令 |
描述 |
/rsd enable/disable |
启用或禁用 RandomSlotDrop 插件。 |
/rsd reload |
重新加载 config.yml 以应用配置更改。 |
/rsd status |
显示当前插件状态(已启用/已禁用)。 |
/rsd set slots <0-100> |
设置要掉落的物品栏格子百分比。 |
/rsd set min <0-100> |
设置最小堆叠掉落百分比。 |
/rsd set max <0-100> |
设置最大堆叠掉落百分比。 |
/rsd set spectatorDrop <true/false> |
启用/禁用在旁观者模式下掉落完整物品栏。 |
配置文件 (plugins/RandomSlotDrop/config.yml)
# 启用或禁用插件
enabled: true
# 如果设置为 true,当玩家死亡且其游戏模式为旁观者时,其完整物品栏将会掉落。
spectatorFullDrop: true
# 死亡时随机选择部分掉落所对应的物品栏格子百分比。
dropSlotsPercent: 25.0
# 当选定格子的堆叠大小 > 1 时,要掉落的最小物品百分比。
stackDropPercentMin: 20.0
# 当选定格子的堆叠大小 > 1 时,要掉落的最大物品百分比。
stackDropPercentMax: 80.0
RandomSlotDrop
RandomSlotDrop is a Minecraft plugin that allows players to keep a portion of their inventory upon death. It introduces a configurable chance for dropping only a certain percent of random inventory slots, giving players a better experience by reducing frustration from losing everything after death.

Functional overview
-
Configurable slot drops
Only a specific percentage of inventory slots are randomly selected to drop upon player death.
For example, suppose the dropSlotsPercent is set to 10%. Since players have a total of 41 inventory slots (36 general slots + 4 armor slots + off-hand slot), the plugin calculates 10% of 41, resulting in approximately 4 random slots chosen to drop items. If a player has items in only 10 of slots, then up to 4 slots might drop items or none at all if the randomly selected slots are empty.
-
Partial stack drops
For each selected slot containing more than one item, the plugin will randomly choose a partial stack size to drop, within a configured range (from stackDropPercentMin% to stackDropPercentMax% of the stack). If you set both the min and max to 100, the entire stack will always drop.
-
Drop full inventory on spectator gamemode
Optionally, if a player dies and is switched to spectator mode shortly afterward, their entire inventory will automatically drop (configured via spectatorFullDrop).
Plugin commands
| Command |
Description |
/rsd enable/disable |
Enable or disable the RandomSlotDrop plugin. |
/rsd reload |
Reload config.yml to apply configuration changes. |
/rsd status |
Show current plugin status (enabled/disabled). |
/rsd set slots <0-100> |
Set percentage of inventory slots to drop. |
/rsd set min <0-100> |
Set minimum stack drop percentage. |
/rsd set max <0-100> |
Set maximum stack drop percentage. |
/rsd set spectatorDrop <true/false> |
Enable/disable full inventory drop on spectator gamemode. |
Configuration (plugins/RandomSlotDrop/config.yml)
# Enable or disable the plugin
enabled: true
# If set to true, the player’s full inventory will drop when they die and their gamemode is Spectator.
spectatorFullDrop: true
# Percentage of inventory slots to randomly select for partial drop on death.
dropSlotsPercent: 25.0
# Minimum percentage of items in a selected slot to drop when its stack size > 1.
stackDropPercentMin: 20.0
# Maximum percentage of items in a selected slot to drop when its stack size > 1.
stackDropPercentMax: 80.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧