DeathPenalties - 死亡惩罚控制
控制玩家死亡时所受的惩罚(生命值、背包、命令等)
Bukkit / Spigot
作者 Whawhatausore
支持版本 1.13 - 1.18
服务器使用量
未统计
服务玩家数
未统计
下载量
4,212
插件详细介绍
DeathPenalties 是一款用于增强玩家死亡惩罚的插件:你可以在玩家死亡后不让其以满生命/满饱食度复活,也可以在其死亡或重生时执行命令,例如给予药水效果或生成生物。
功能特色
- 支持按世界分别配置。
- 支持固定值与百分比两种方式。
- 可设置每种惩罚生效的概率。
- 可设置玩家重生时的生命值与饱食度。
- 可设置玩家死亡时掉落和/或销毁的物品、经验、等级。
- 可设置玩家死亡时损失的金钱。
- 可设置惩罚损失的金钱转入的银行账户名。
- 可将死亡损失的金钱转给击杀者。
- 支持白名单物品,使其不受插件掉落/销毁规则影响。
- 可在玩家死亡时或重生时,以玩家或服务器身份执行命令(使用
%player%代入目标玩家名)。 - 可忽略 OP 和拥有指定权限的玩家。
- 支持 Multiverse。
- 支持 Vault。
- 支持 MobArena(玩家在竞技场中死亡时可忽略惩罚)。
安装与使用
- 将
.jar文件放入服务器的plugins文件夹。 - 重启或重载服务器以生成默认配置。
- 编辑配置文件。
- 再次重启或重载服务器以应用更改。
注意
- 本插件支持默认的 Bukkit
/reload命令。
配置说明 / 教程
基本规则
- 你可以为不同世界添加单独配置。
- 如果某个世界未被添加到配置中,则会使用默认值。
- 如果某个选项缺失,则会回退到默认值。
- 请严格遵守配置格式,否则插件会忽略该配置。
- 对于固定值:如果
value <= 0,则会改用百分比值。 - 如果固定值
> 0,则百分比值会被忽略。 - 对于背包相关配置,
destroyed和dropped可以在一次死亡中同时生效。
世界配置示例说明
以下是原文中的 YAML 示例与注释说明
##### GENERAL CONFIGURATION VALUES #####
#
# DeathPenalties plugin configuration
# For more information and/or support visit: https://www.spigotmc.org/resources/deathpenalties.58944/
#
##### PER WORLD CONFIGURATION VALUES #####
#
# you can add worlds here to set per world custom values
# if a world is not added here default values will be used instead
# if an option is missing it will be set to its default value
# be careful to respect the format otherwise the plugin will ignore it
#
# for flat values if value <= 0 percentage value is used instead
# percentage values are ignored if you have set a flat value > 0
#
# for inventory values destroyed and dropped values can both be done on player death
#
#example_world:
# enabled: true
# # if enabled death penalties will be applied
#
# respawn-health-flat: 0.0
# # health penalised player will respawn with
#
# respawn-food-flat: 0
# # food penalised player will respawn with (integer numbers)
#
# death-money-lost-flat: 10.0
# # money penalised player will lose on death
#
# death-items-dropped-flat: 1 (integer numbers)
# # items that will be dropped from penalised player inventory on death
#
# death-items-destroyed-flat: 1 (integer numbers)
# # items that will be destroyed in penalised player inventory on death
#
# respawn-health-percentage: 0.21
# # health penalised player will respawn with in percentage (0.21 is 21 percents)
#
# respawn-health-chance-percentage: 1.0
# # the chance a penalised player health will be set on respawn (1.0 is 100 percents)
#
# respawn-food-percentage: 0.4
# # food penalised player will respawn with in percentage
#
# respawn-food-chance-percentage: 1.0
# # the chance a penalised player food will be set on respawn (1.0 is 100 percents)
#
# death-money-lost-percentage: 0.01
# # money penalised player will lose on death in percentage
#
# death-money-lost-chance-percentage: 1.0
# # the chance a penalised player will lose money on death (1.0 is 100 percents)
#
# death-money-lost-bank-account: 'example_account'
# # the account the lost money with penalties is going to
#
# death-money-lost-killer: false
# # if true money lost by the penalty will be added to the killer (money is doubled if a bank account is set too)
#
# death-items-dropped-percentage: 0.05
# # items that will be dropped from penalised player inventory on death in percentage
#
# death-items-dropped-chance-percentage: 0.5
# # chance that items will be dropped from penalised player inventory on death in percentage
#
# death-items-destroyed-percentage: 0.05
# # items that will be destroyed in penalised player inventory on death in percentage
#
# death-items-destroyed-chance-percentage: 0.5
# # chance that items will be destroyed in penalised player inventory on death in percentage
#
# death-experience-dropped-flat: 10.0
# # experience that will be dropped from penalised player inventory on death
#
# death-experience-dropped-percentage: 0.1
# # experience that will be dropped from penalised player inventory on death in percentage
#
# death-experience-dropped-chance-percentage: 0.5
# # chance that experience will be dropped from penalised player inventory on death in percentage
#
# death-experience-destroyed-flat: 10.0
# # experience that will be destroyed from penalised player inventory on death
#
# death-experience-destroyed-percentage: 0.1
# # experience that will be destroyed from penalised player inventory on death in percentage
#
# death-experience-destroyed-chance-percentage: 0.5
# # chance that experience will be destroyed from penalised player inventory on death in percentage
#
# death-levels-destroyed-flat: 1 (integer numbers)
# # levels that will be destroyed from penalised player inventory on death
#
# death-levels-destroyed-percentage: 0.05
# # levels that will be destroyed from penalised player inventory on death in percentage
#
# death-levels-destroyed-chance-percentage: 0.5
# # chance that levels will be destroyed from penalised player inventory on death in percentage
#
# whitelisted-items:
# - DIAMOND_PICKAXE
# - DIAMOND_SWORD
# - DIAMOND_HELMET
# - DIAMOND_CHESTPLATE
# - DIAMOND_LEGGINGS
# - DIAMOND_BOOTS
# # items type that will be ignored by the destroy/drop items options
# # warning do not forget that if you create a world specific whitelist the default one will be overwritten!
# # the list of materials that can be used can be found here:
# # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
#
# respawn-processed-commands:
# - SERVER;effect give %player% minecraft:slowness 30 0 true
# # commands that will be processed when the player respawns
# # command format is EXECUTER_TYPE;COMMAND executer type can be [SERVER/PLAYER]
# # warning do not add the / before the command! Older versions commands are valid too
# # %player% can be used and represents the player name
# # for example this command will apply the slowness potion effect for 30s when the player respawns
#
# death-processed-commands:
# - SERVER;execute at %player% run summon minecraft:zombie
# # commands that will be processed when the player dies
# # for example this command will spawn a zombie at the player death location when he dies
#
#
#
# values below are examples of use and for testing purpose replace it by your own !
#
# !!!!! IF AN OPTION IS NOT WORKING MAKE SURE THAT YOU HAVE A VALUE SET FOR IT !!!!!
# if you have set a value for each option in default values you do not have to care about it in other ones
bypass-op-permission: true
# this option is used for op testing purposes
# set it to true if you want op players to be affected by penalties
default_values:
enabled: true
respawn-health-percentage: 0.5
respawn-health-chance-percentage: 1.0
respawn-food-flat: 16
respawn-food-chance-percentage: 1.0
death-money-lost-flat: 10
death-money-lost-chance-percentage: 1.0
death-money-lost-bank-account: ''
death-money-lost-killer: false
death-items-dropped-percentage: 0.25
death-items-dropped-chance-percentage: 0.5
death-items-destroyed-flat: 2
death-items-destroyed-chance-percentage: 0.5
death-experience-dropped-flat: 10
death-experience-dropped-percentage: 0.1
death-experience-dropped-chance-percentage: 0.5
death-experience-destroyed-flat: 10
death-experience-destroyed-percentage: 0.1
death-experience-destroyed-chance-percentage: 0.5
death-levels-destroyed-flat: 1
death-levels-destroyed-percentage: 0.05
death-levels-destroyed-chance-percentage: 0.5
whitelisted-items:
- DIAMOND_PICKAXE
- DIAMOND_SWORD
- DIAMOND_HELMET
- DIAMOND_CHESTPLATE
- DIAMOND_LEGGINGS
- DIAMOND_BOOTS
respawn-processed-commands:
- SERVER;effect give %player% minecraft:slowness 30 0 true
- SERVER;effect give %player% minecraft:mining_fatigue 60 0 true
- SERVER;effect give %player% minecraft:weakness 120 0 true
death-processed-commands:
- SERVER;execute at %player% run summon minecraft:zombie
world_nether:
enabled: true
respawn-health-flat: 4
respawn-food-percentage: 0.5
death-money-lost-percentage: 0.01
death-items-dropped-chance-percentage: 1.0
death-items-destroyed-percentage: 0.25
respawn-processed-commands:
- SERVER;effect give %player% minecraft:slowness 60 1 true
- SERVER;effect give %player% minecraft:mining_fatigue 90 1 true
- SERVER;effect give %player% minecraft:weakness 180 1 true
world_the_end:
enabled: true
respawn-food-flat: 2
respawn-health-percentage: 0.05
death-items-dropped-chance-percentage: 1.0
death-items-destroyed-chance-percentage: 1.0
respawn-processed-commands:
- SERVER;effect give %player% minecraft:slowness 100 1 true
- SERVER;effect give %player% minecraft:mining_fatigue 150 2 true
- SERVER;effect give %player% minecraft:weakness 200 2 true
world_creative:
enabled: false配置要点
bypass-op-permission- 用于 OP 测试。
- 设为
true时,OP 玩家也会受到惩罚影响。
default_values- 默认配置区域。
- 当某世界未单独设置某项时,会使用这里的值。
whitelisted-items- 这些物品不会被
destroy/drop items相关选项影响。 - 如果你为某个世界单独设置了白名单,该世界会覆盖默认白名单,而不是合并。
- 可用材质列表见:
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
respawn-processed-commands- 玩家重生时执行的命令。
- 格式为
EXECUTER_TYPE;COMMAND EXECUTER_TYPE可为[SERVER/PLAYER]- 不要在命令前添加
/ - 旧版本命令也可使用。
%player%表示玩家名称。- 示例:
- `SERVER;effect give %player% minecraft:slowness 30 0 true`death-processed-commands- 玩家死亡时执行的命令。
- 示例:
- `SERVER;execute at %player% run summon minecraft:zombie`重要提示
IF AN OPTION IS NOT WORKING MAKE SURE THAT YOU HAVE A VALUE SET FOR IT !!!!!- 如果你已经在
default_values中为每个选项设置了值,那么在其他世界配置中通常无需重复填写所有项目。
权限节点
dp.ignore- 允许玩家忽略死亡惩罚。
dp.commands.info- 允许使用信息查询类命令。
dp.commands.edit- 允许使用编辑类命令。
dp.commands.*- 允许使用所有命令。
dp.*- 允许忽略死亡惩罚,并允许使用所有命令。
命令
`/dpstate`
- 作用:显示死亡惩罚在指定世界中的配置值。
- 用法:
/dpstate <world_name>- 说明:
- 你可以使用
all查看所有世界的状态。 - 如果你是玩家且未指定世界,则默认使用你当前所在的世界。
- 权限:
dp.commands.info
`/dpedit`
- 作用:编辑指定世界的死亡惩罚配置值。
- 用法:
/dpedit <world_name> <option_name> <option_value>- 说明:
- 你可以使用
all同时编辑所有世界。 - 权限:
dp.commands.edit
支持
- 插件支持通过 Spigot 论坛主题提供。
关于作者与插件系列
- 本插件来自 WaffleProject 的 Minecraft 插件合集。
- 这是一组作者曾经为了个人使用而制作的插件。
- 由于旧版本已经严重过时,且 Minecraft
1.13对游戏代码进行了大量改动,因此作者决定将这些插件从头重写。 - 由于作者目前已不再运营 Minecraft 服务器,所以决定将这些插件公开发布,供所有人使用。
- 这些插件的设计目标是轻量、高效、简单。
- 它们可以彼此联动,组合后可形成更复杂的功能体系。
- 当然,你也可以单独使用其中任意一个插件,并不要求必须配套使用。
兼容版本与更新说明
- 这些插件的目标版本为
1.13+。 - 如果作者有足够时间,未来可能会加入对更旧版本的支持。
- 也有可能某些旧版本无需额外处理就能直接兼容。
- 作者在最初发布时选择保持插件轻量,以便能够同时开发多个插件。
- 最常被请求的功能通常会优先添加。
- Minecraft 插件开发只是作者的个人爱好。
- 如果插件长时间没有更新,请保持耐心,更新仍有可能会到来。
测试支持版本
版本分布
基本信息
插件名称
DeathPenalties
作者
Whawhatausore
平台
Bukkit / Spigot
支持版本
1.13 - 1.18
点赞数
未统计
Modrinth 下载
62
最近版本
暂无数据
-