DeathPulse 插件
简介
DeathPulse 是一款 Minecraft 插件,旨在通过修改玩家在死亡时的生命值机制来增强游戏体验。该插件允许服务器管理员配置玩家在特定类型的死亡中获得的或失去的生命值,为游戏带来独特的变化。
安装
- 从 发布页面 下载最新版本的 DeathPulse 插件。
- 将下载的 JAR 文件放入服务器的
plugins 目录中。
- 启动或重启您的 Minecraft 服务器。
- 插件将在
plugins/DeathPulse 目录中生成一个默认配置文件。
- 编辑配置文件以自定义插件的行为。
- 使用
/dp reload 命令重新加载插件。
命令
主命令
/DeathPulse 或 /dp
- 别名:
dp
- 用法:
/dp <子命令>
- 描述: DeathPulse 插件的主命令。
- 权限:
dp.admin,或者仅将特定子命令的 permissionsAllPlayer 设置为 true(请注意,不建议对所有子命令都这样做)
子命令
-
reload:
- 用法:
/dp reload
- 描述: 重新加载插件配置,无需重启服务器。
- 权限:
dp.reload
-
setConfig:
- 用法:
/dp setConfig <key> <value>
- 描述: 仅使用命令设置插件的配置值。
- 权限:
dp.setConfig
-
setMaxHealth:
- 用法:
/dp setMaxHealth <player> <amount>
- 描述: 设置指定玩家的最大生命值。
- 权限:
dp.setMaxHealth
-
viewHealth:
- 用法:
/dp viewHealth <玩家>
- 描述:查看指定玩家的负债数据和死亡数据。
- 权限:
dp.viewHealth
-
viewDeathData:
- 用法:
/dp viewDeathData
- 描述: 查看执行该命令的玩家的个人死亡数据。
- 权限:
dp.viewDeathData
-
viewDebtData:
- 用法:
/dp viewDebtData
- 描述: 查看执行该命令的玩家的个人债务数据。
- 权限:
dp.viewDebtData
-
resetHealth:
- 用法:
/dp resetHealth <player|allPlayer>
- 描述: 将指定玩家或所有玩家的生命值重置为初始生命值。
- 权限:
dp.resetHealth
-
matchHealth:
- 用法:
/dp matchHealth <player|allPlayer>
- 描述: 根据死亡数据,将指定玩家或所有玩家的生命值调整为一致。
- 权限:
dp.matchHealth
-
removeDeathData:
- 用法:
/dp removeDeathData <player|allPlayer>
- 描述: 移除指定玩家或所有玩家的死亡数据。
- 权限:
dp.removeDeathData
-
removeDebtData:
- 用法:
/dp removeDebtData <player|allPlayer>
- 描述: 移除指定玩家或所有玩家的负债数据。
- 权限:
dp.removeDebtData
-
transferHealth:
- 用法:
/dp transferHealth <player> <amount>
- 描述: 将执行命令的玩家的生命值转移给另一名玩家。
- 权限:
dp.transferHealth
-
withdrawHealth:
- 用法:
/dp withdrawHealth <player> <amount>
- 描述: 从执行命令的玩家处抽取生命值,用于制作生命物品(HealthItem)。
- 权限:
dp.withdrawHealth
-
help:
- 用法:
/dp help
- 描述: 显示此帮助信息。
- 权限:
dp.help
权限
dp.admin: 可访问所有 DeathPulse 命令。
dp.reload: 允许重新加载插件配置。
dp.setConfig: 允许更改插件配置。
dp.setMaxHealth: 允许设置玩家生命值。
dp.viewHealth: 允许查看玩家生命值。
dp.viewDeathData: 允许查看玩家死亡数据。
dp.viewDebtData: 允许查看玩家负债数据。
dp.resetHealth: 允许重置玩家生命值。
dp.matchHealth: 允许匹配玩家生命值。
dp.removeDeathData: 允许移除玩家死亡数据。
dp.removeDebtData: 允许移除玩家负债数据。
dp.transferHealth: 允许将生命值转移给其他玩家。
dp.withdrawHealth: 允许抽取生命值以制作生命物品(HealthItem)。
dp.help: 允许查看帮助信息。
配置
config.yml
配置文件(`config.yml`)允许你自定义插件的各个方面:
############ 关键设置 ############
config-version: 1 # 配置文件版本,如果您不知道自己在做什么,请勿更改此部分
firstTimeSetup: 0 # 插件在此服务器上的首次设置日期(天数),如果您不知道自己在做什么,请勿更改此部分
checkDayPeriod: 30 # 服务器内的每日检查周期(秒),数值越低越准确,但可能导致卡顿
############ 世界设置 ############
worldDaySettings:
world: 24000
# <世界名称>: <该世界中每天的刻数> # <世界名称> 是世界名称,<该世界中每天的刻数> 是该世界中每天的刻数
#world_nether: 24000 # 不使用默认值,因为下界没有昼夜循环
############ 生命值设置 ############
hp: # 生命值设置
start: 20 # 玩家初始生命值
maxHP: # 玩家最大生命值上限
enabled: false # 启用最大生命值限制 (true/false),当为 true 时,玩家拥有最大生命值上限
amount: 140 # 玩家的最大生命值上限数值
dropHealthItem: true # 当玩家死亡并增加生命值达到最大生命值时,掉落生命值物品
minHP: # 玩家最小生命值下限
enabled: false # (true/false) 当为 true 时,玩家拥有最小生命值下限;当为 false 时,生命值为 0 的玩家将被封禁
amount: 2 # 玩家最小生命值下限数值
banTime: 24 # 封禁时间(以现实小时为单位),设置为 0 则永久封禁
afterBan: 2 # 玩家在被封禁后返回服务器时的生命值
############ 生命值物品设置 ############
healthItem:
material: "NETHER_STAR" # 物品材质
name: "&c生命令牌" # 物品名称
lore: # 物品描述
- "&7右键点击使用"
- ""
- "&7可用于提升您的 &7最大生命值"
healthPerItem: 2 # 每个物品提供的生命值
cannotToCraft: ["BEACON"] # 无法使用生命值物品合成的物品列表
############ 优先级死亡设置 ############
priority: ["IGNORE", "INCREASE", "DECREASE"]
优先级死亡:首先检查具有较高优先级的玩家死亡类型,当玩家以该类型死亡时,将不再检查其他类型
死亡类型列表:IGNORE, INCREASE, DECREASE
############ IGNORE 死亡设置 ############
ignore: # 忽略死亡
enabled: false # (true/false) 为 true 时,玩家可以忽略他们的死亡
must_difference: false # (true/false) 为 true 时,之前因忽略原因死亡的玩家可以再次使用相同原因的忽略功能
当为 false 时,即使重复以相同原因类型死亡,玩家也始终忽略 HP,不会记录其死亡数据
cause: # 被忽略的死亡类型
- ALL # 忽略所有死亡类型
#- LAVA
#- FALL
#- 等等。
# 在死亡类型后添加 ::EXCLUDE 以排除该死亡类型
day: # 被忽略的天数设置
enabled: false # true 或 false,为 true 时,忽略天数生效
must_difference: false # (true/false) 为 true 时,之前因忽略天数原因死亡的玩家可以再次使用相同天数原因的忽略功能
# 当为 false 时,即使重复以相同天数原因类型死亡,玩家也始终忽略 HP,不会记录其死亡数据
deActiveIncrease: false # true 或 false,为 true 时,增加死亡在忽略天数期间不生效
deActiveDecrease: false # true 或 false,为 true 时,减少死亡在忽略天数期间不生效
deActiveIncreaseDay: false # true 或 false,为 true 时,增加天数在忽略天数期间不生效
deActiveDecreaseDay: false # true 或 false,为 true 时,减少天数在忽略天数期间不生效
type: "minecraft" # "real" 用于现实世界日期,"minecraft" 用于 Minecraft 游戏内日期
days: [ 19, 23, 29 ] # 忽略天数生效的天数列表(作为倍数)
cause: # 被忽略的天数原因(死亡类型)
- ALL # 忽略所有死亡类型
#- LAVA
#- FALL
#- 等等。
# 在死亡类型后添加 ::EXCLUDE 以排除该死亡类型
############ INCREASE 死亡设置 ############
increase: # 玩家死亡时增加 HP
enabled: true # true 或 false,为 true 时,玩家可以增加他们的 HP
must_difference: true # (true/false) 为 true 时,之前因增加原因死亡的玩家不能再次使用相同原因的增血功能
当为 false 时,即使重复以相同原因类型死亡,玩家也始终增加 HP,不会记录其死亡数据
cause: # 增加死亡类型和增加量,(TYPE::AMOUNT)
- ALL::2 # 增加所有死亡类型
#- LAVA::4
- FALL::1 # 如果使用 ALL 但需要某些死亡类型的自定义增加量,可以像这样在下面添加
# - 等等。
# 将数字更改为 EXCLUDE 以排除该死亡类型(例如 LAVA::EXCLUDE)
day: # 增加天数设置
enabled: false # true 或 false,为 true 时,增加天数生效
must_difference: true # (true/false) 为 true 时,之前因增加天数原因死亡的玩家不能再次使用相同天数原因的增血功能
# 当为 false 时,即使重复以相同天数原因类型死亡,玩家也始终增加 HP,不会记录其死亡数据
deActiveIgnore: false # true 或 false,为 true 时,忽略死亡在增加天数期间不生效
deActiveDecrease: false # true 或 false,为 true 时,减少死亡在增加天数期间不生效
deActiveIgnoreDay: false # true 或 false,为 true 时,忽略天数在增加天数生效期间不生效
deActiveDecreaseDay: false # true 或 false,为 true 时,减少天数在增加天数生效期间不生效
type: "minecraft" # "real" 用于现实世界日期,"minecraft" 用于 Minecraft 游戏内日期
days: [ 11, 13, 17 ] # 增加天数生效的天数列表(作为倍数)
cause: # 增加天数原因(死亡类型和增加量),(TYPE::AMOUNT)
- ALL::10 # 增加所有死亡类型
- LAVA::14 # 如果使用 ALL 但需要某些死亡类型的自定义增加天数量,可以像这样在下面添加
#- FALL::4
# - 等等。
# 将数字更改为 EXCLUDE 以排除该死亡类型(例如 LAVA::EXCLUDE)
############ DECREASE 死亡设置 ############
decrease: # 以特定类型死亡时减少玩家 HP
enabled: false # true 或 false,为 true 时,玩家可以减少他们的 HP
must_difference: false # (true/false) 为 true 时,之前因减少原因死亡的玩家不能再次使用相同原因的减血功能
当为 false 时,即使重复以相同原因类型死亡,玩家也始终减少 HP,不会记录其死亡数据
debt: true # (true/false) 为 true 时,如果玩家获得减少但没有足够的 HP,当他们增加 HP 时,HP 将用于偿还债务
cause: # 减少死亡类型和减少量,(TYPE::AMOUNT)
- ALL::4 # 减少所有死亡类型
- PLAYER_ATTACK::6 # 如果使用 ALL 但需要某些死亡类型的自定义减少量,可以像这样在下面添加
- FALL::EXCLUDE
#- 等等。
# 将数字更改为 EXCLUDE 以排除该死亡类型(例如 PLAYER_ATTACK::EXCLUDE)
day: # 减少天数设置
enabled: false # true 或 false,为 true 时,减少天数生效
must_difference: false # (true/false) 为 true 时,之前因减少天数原因死亡的玩家不能再次使用相同天数原因的减血功能
# 当为 false 时,即使重复以相同天数原因类型死亡,玩家也始终减少 HP,不会记录其死亡数据
deActiveIgnore: false # true 或 false,为 true 时,忽略死亡在减少天数期间不生效
deActiveIncrease: false # true 或 false,为 true 时,增加死亡在减少天数期间不生效
deActiveIgnoreDay: false # true 或 false,为 true 时,忽略天数在减少天数生效期间不生效
deActiveIncreaseDay: false # true 或 false,为 true 时,增加天数在减少天数生效期间不生效
type: "minecraft" # "real" 用于现实世界日期,"minecraft" 用于 Minecraft 游戏内日期
days: [ 5, 7 ] # 生效减少天数的天数列表(以倍数表示)
cause: # 减少天数的原因(死亡类型和减少量),格式为 (TYPE::AMOUNT)
- ALL::16 # 减少所有死亡类型的天数
- PLAYER_ATTACK::18 # 如果使用 ALL,但需要对某些死亡类型自定义减少的天数,可以像下面这样添加
#- FALL::EXCLUDE
#- 等等。
# 将数字改为 EXCLUDE 放在死亡类型后面以排除该死亡类型(例如 PLAYER_ATTACK::EXCLUDE)
############ 季节设置 ############
season: # 季节设置,将季节天数添加到玩家死亡数据中,以便在季节更替时玩家可以以相同原因再次死亡
enabled: true # true 或 false,当为 true 时,季节功能激活
type: "real" # "real" 表示每个季节对应现实世界的一天,"minecraft" 表示每个季节对应 Minecraft 游戏内的一天
day: 30 # 季节更替的天数(倍数)
resetWorldDay: false # true 或 false,当为 true 时,在季节更替时将所有世界的游戏内天数和现实世界设置的天数重置为 0
############ 权限设置 ############
permissionsAllPlayer: # 赋予所有玩家权限,OP(管理员)无需此权限即可使用命令
reload: false # 允许所有玩家使用 reload 命令
setConfig: false # 允许所有玩家使用 setConfig 命令
setMaxHealth: false # 允许所有玩家使用 setMaxHealth 命令
viewHealth: false # 允许所有玩家使用 viewHealth 命令
viewDeathData: true # 允许所有玩家使用 viewDeathData 命令
viewDebtData: true # 允许所有玩家使用 viewDebtData 命令
resetHealth: false # 允许所有玩家使用 resetHealth 命令
matchHealth: false # 允许所有玩家使用 matchHealth 命令
removeDeathData: false # 允许所有玩家使用 removeDeathData 命令
removeDebtData: false # 允许所有玩家使用 removeDebtData 命令
transferHealth: true # 允许所有玩家使用 transferHealth 命令
withdrawHealth: true # 允许所有玩家使用 withdrawHealth 命令
help: true # 允许所有玩家使用 help 命令
############ 通知设置 ############
notifications:
defaultDeathMessage: false # true 或 false,当为 false 时,其他玩家不会收到默认的死亡消息
player:
maxHealth: "&b你&f已达到&c最大生命值上限&f。"
minHealth: "&b你&f已达到&c最小生命值下限&f。"
banReason: "&b你&f因生命值过低被&c封禁&f"
kicked: "&b你&f因生命值过低被&c踢出服务器&f"
ignored: "&f死亡原因为 &c{cause}&f,当前&c未增加&f生命值"
ignoredSameWay: "&c无法&f忽略该原因,因为你以&c相同方式&f死亡过"
increased: "&b你&a增加了 &d{increase}&f 点生命值,原因:&c{cause}"
increaseSameWay: "&b你&c未能通过以相同方式死亡来增加生命值&f"
decreased: "&b你&c减少了 &d{decrease}&f 点生命值,原因:&c{cause}"
decreaseSameWay: "&b你&c未能通过以相同方式死亡来减少生命值&f"
debtPaidOff: "&b你&f已还清&c {debtPaid}&f 点生命值债务"
debtReduced: "&b你&f已将生命值债务减少至&c {debtPaid}&f 点,剩余&c {debtLeft}&f 点生命值债务"
debtAdded: "&b你&f新增了&c {debtAdded}&f 点生命值债务,你现在必须偿还&c {debtLeft}&f 点生命值债务"
# 特殊日期的警告消息
warning:
ignoredDay: "&6⚠ &e今天是&6豁免日&e!死亡不会影响你的生命值!"
increaseDay: "&6⚠ &e今天是&a增益日&e!死亡时会获得额外生命值!"
decreaseDay: "&6⚠ &e今天是&c减益日&e!小心,死亡时会损失更多生命值!"
seasonChange: "&6⚠ &e季节更替!已重置你的死亡数据!"
logServer:
maxHealth: "&b{name}&f已达到&c最大生命值上限&f。"
minHealth: "&b{name}&f已达到&c最小生命值下限&f。"
increased: "&b{name}&a通过&b {cause}&f增加了 &d{increase}&f 点生命值"
decreased: "&b{name}&c通过&b {cause}&f减少了 &d{decrease}&f 点生命值,原因:&c{cause}"
banReason: "&b{name}&f因生命值过低被&c封禁&f"
</details>
## 特性
- **忽略死亡**:忽略死亡事件,防止玩家因此获得或失去生命值。
- **生命值增加**:玩家在死亡后生命值会增加。
- **生命值减少**:如果已配置,玩家在死亡后会失去生命值。
- **指定死亡类型进行忽略、增加和减少**:指定某些死亡类型以忽略、增加或减少生命值。
- **所有类型死亡的忽略、增加和减少**:使用 `ALL` 对所有死亡原因进行生命值的忽略、增加或减少。
- **增加和减少的量**:指定在特定死亡类型下增加或减少的生命值数量。
- **排除特定死亡类型的忽略、增加和减少**:从某些死亡类型中排除(EXCLUDE)某些死亡原因,使其不参与生命值修改。
- **按天配置的忽略、增加和减少**:允许配置特定的天数,在这些天数内生效死亡忽略、增加和减少功能,无论死亡原因如何(部分设置下)。如果你只想在指定天数内减少生命值而不影响其他天数的玩家生命值,请将 `increase` 或 `decrease` 设置中的 `per_death` 设为 0。
- **在特定日期停用其他死亡类型**:允许在特定日期停用其他死亡类型。
- **相同方式死亡判定**:如果 `difference` 设置为 false,且本次死亡方式与上次死亡相同,则玩家不会再次增加或减少生命值。
- **可自定义优先级**:为不同的死亡类型设置优先级,以确定生命值修改的顺序。
- **季节变更**:配置季节设置,以便在季节更替时,使玩家因相同原因再次增加或减少生命值。
- **天数重置**:配置季节更替时的天数重置设置,使天数归零。
- **可自定义消息**:定制玩家在死亡时收到的消息。
- **首次加入生命值**:设置玩家首次加入服务器时的初始生命值。
- **最大生命值限制**:设置玩家可达到的最大生命值上限。
- **最小生命值限制/封禁**:设置最小生命值限制,或者当玩家生命值降至零时将其封禁。
- **债务生命值**:如果玩家生命值低于最小值或在减少时低于 0,则让玩家产生“债务”生命值。
- **生命值物品**:自定义生命值物品的设置,并使得该物品不能用于合成特定物品。
- **生命值物品掉落**:当玩家通过增加达到最大生命值上限时,掉落一个生命值物品。
- **首次安装设置**:设置插件在本服务器上的安装第一天(`System.currentTimeMillis()`),如果你不知道自己在做什么,请勿更改此部分。
- **天数检查周期**:设置本服务器的天数检查周期(以秒为单位),数值越低越准确,但可能导致卡顿。
- **世界天数设置**:设置不同世界中每天所需的刻数(ticks per day),用于忽略天数、增加天数和减少天数的计算。
- **配置重载**:通过命令重载插件配置,无需重启服务器。
- **使用命令设置配置**:通过命令设置特定的配置值。
- **生命值匹配**:通过命令根据死亡数据匹配指定玩家或所有玩家的生命值。
- **转移生命值**:通过命令将生命值转移到另一名玩家。
- **提取生命值**:通过命令提取生命值物品。
- **权限设置**:为所有玩家的不同命令设置特定权限,这样玩家可以在没有 `dp.*` 权限的情况下运行这些命令(后果自负)。
## 事件监听器
- **PlayerJoinListener**:处理玩家首次加入服务器时设置其初始生命值。
- **HealthItemListener**:处理生命值物品的逻辑。
- **PlayerDeathListener**:处理玩家死亡时的生命值修改逻辑。
## 贡献
欢迎贡献!<!-- 请阅读 [CONTRIBUTING.md](#) 以开始。 -->
<!--
## 许可证
本项目采用 Apache License 2.0 许可证。详情请参阅 [LICENSE](LICENSE) 文件。 -->
---
虽然 DeathPulse 为 Minecraft 玩法提供了独特的转折,但仍有改进空间。未来的增强可能包括对生命值修改的更精细控制以及额外的可配置事件。您的反馈和贡献将使这个插件变得更好!
祝您在 DeathPulse 中玩得愉快!
DeathPulse Plugin
Introduction
DeathPulse is a Minecraft plugin designed to enhance gameplay by modifying player health mechanics upon death. The plugin allows server administrators to configure health gained or lost when players die in certain types of deaths, providing a unique twist to the game.
Installation
- Download the latest version of the DeathPulse plugin from the releases page.
- Place the downloaded JAR file into your server's
plugins directory.
- Start or restart your Minecraft server.
- The plugin will generate a default configuration file in the
plugins/DeathPulse directory.
- Edit the configuration file to customize the plugin's behavior.
- Reload the plugin using the
/dp reload command.
Commands
Main Command
/DeathPulse or /dp
- Aliases:
dp
- Usage:
/dp <subcommand>
- Description: Main command for the DeathPulse plugin.
- Permission:
dp.admin or just set permissionsAllPlayer for specific Subcommands to true (keep in mind this is not recommended to all subcommands)
Subcommands
-
reload:
- Usage:
/dp reload
- Description: Reloads the plugin configuration without restarting the server.
- Permission:
dp.reload
-
setConfig:
- Usage:
/dp setConfig <key> <value>
- Description: Sets a configuration value for the plugin just using command.
- Permission:
dp.setConfig
-
setMaxHealth:
- Usage:
/dp setMaxHealth <player> <amount>
- Description: Sets the maximum health of a specified player.
- Permission:
dp.setMaxHealth
-
viewHealth:
- Usage:
/dp viewHealth <player>
- Description: Views the health of a specified player their debt data and death data.
- Permission:
dp.viewHealth
-
viewDeathData:
- Usage:
/dp viewDeathData
- Description: Views the death data of players who run the command.
- Permission:
dp.viewDeathData
-
viewDebtData:
- Usage:
/dp viewDebtData
- Description: Views the debt data of players who run the command.
- Permission:
dp.viewDebtData
-
resetHealth:
- Usage:
/dp resetHealth <player|allPlayer>
- Description: Resets the health of a specified player or all players to the starting health.
- Permission:
dp.resetHealth
-
matchHealth:
- Usage:
/dp matchHealth <player|allPlayer>
- Description: Matches the health of a specified player or all players based on their death data.
- Permission:
dp.matchHealth
-
removeDeathData:
- Usage:
/dp removeDeathData <player|allPlayer>
- Description: Removes the death data of a specified player or all players.
- Permission:
dp.removeDeathData
-
removeDebtData:
- Usage:
/dp removeDebtData <player|allPlayer>
- Description: Removes the debt data of a specified player or all players.
- Permission:
dp.removeDebtData
-
transferHealth:
- Usage:
/dp transferHealth <player> <amount>
- Description: Transfers health from one player(who run the command) to another.
- Permission:
dp.transferHealth
-
withdrawHealth:
- Usage:
/dp withdrawHealth <player> <amount>
- Description: Withdraws health from a player(who run the command) to make HealthItem.
- Permission:
dp.withdrawHealth
-
help:
- Usage:
/dp help
- Description: Shows this help message.
- Permission:
dp.help
Permissions
dp.admin: Access to all DeathPulse commands.
dp.reload: Permission to reload the plugin configuration.
dp.setConfig: Permission to change config plugin.
dp.setMaxHealth: Permission to set player health.
dp.viewHealth: Permission to view player health.
dp.viewDeathData: Permission to view death data player.
dp.viewDebtData: Permission to view debt data player.
dp.resetHealth: Permission to reset player health.
dp.matchHealth: Permission to match player health.
dp.removeDeathData: Permission to remove player death data.
dp.removeDebtData: Permission to remove player debt data.
dp.transferHealth: Permission to transfer health to another player.
dp.withdrawHealth: Permission to withdraw health to make HealthItem.
dp.help: Permission to view the help message.
Configuration
config.yml
The configuration file (`config.yml`) allows you to customize various aspects of the plugin:
############ CRUCIAL SETTINGS ############
config-version: 1 # Config version, don't change this section if you don't know what you are doing
firstTimeSetup: 0 # First day Plugin setup in this server, don't change this section if you don't know what you are doing
checkDayPeriod: 30 # Day check period in this server(in seconds), lower value is more accurate but may cause lag
############ WORLD SETTINGS ############
worldDaySettings:
world: 24000
# <world_name>: <ticks_per_day_in_world> # <world_name> is the name of the world, <ticks_per_day_in_world> is the ticks per day in that world
#world_nether: 24000 # not use default because nether don't have day cycle
############ HP SETTINGS ############
hp: # HP settings
start: 20 # Starting HP for players
maxHP: # Max HP player
enabled: false # Enable max HP limit (true/false), when true, player has max HP limit
amount: 140 # Amount of Max HP limit for players
dropHealthItem: true # Drop health item when player reach max HP when dead increase
minHP: # Min HP player
enabled: false # (true/false) when true, player has min HP limit, when false, player with 0 HP getting ban
amount: 2 # Amount of Min HP player limit
banTime: 24 # Ban time in real life hours, set to 0 to ban permanently
afterBan: 2 # Health after player get ban and return back to server after ban
############ HEALTH ITEM SETTINGS ############
healthItem:
material: "NETHER_STAR" # Material item
name: "&cHealth Token" # Item Name
lore: # Item Description
- "&7Right click to use"
- ""
- "&7Can be used to Increase your &7Max Health"
healthPerItem: 2 # Health per item
cannotToCraft: ["BEACON"] # List of items that cannot be crafted using health item
############ PRIORITY DEATH SETTINGS ############
priority: ["IGNORE", "INCREASE", "DECREASE"]
# Priority death, checking player die with higher priority first, when player die with that type, it will not check other type
# List of death type: IGNORE, INCREASE, DECREASE
############ IGNORE DEATH SETTINGS ############
ignore: # Ignore death
enabled: false # (true/false) when true, player can ignore their death
must_difference: false # (true/false) when true, player who had died with ignore cause before, cannot used ignore with same cause again
# when false, player always ignore HP with ignore cause, even repeat death with same cause type, did not record their death data
cause: # Ignored death type
- ALL # Ignore all death type
#- LAVA
#- FALL
#- etc.
# Add ::EXCLUDE in back of death type to exclude that death type
day: # Ignored day settings
enabled: false # true or false, when true, ignored day is active
must_difference: false # (true/false) when true, player who had died with ignore day cause before, cannot ignore with same day cause again
# when false, player always ignore HP with ignore day cause, even repeat death with same day cause type, did not record their death data
deActiveIncrease: false # true or false, when true, increase death not active when ignore day
deActiveDecrease: false # true or false, when true, decrease death not active when ignore day
deActiveIncreaseDay: false # true or false, when true, increase day not active when ignore day
deActiveDecreaseDay: false # true or false, when true, decrease day not active when ignore day
type: "minecraft" # "real" for real-world days, "minecraft" for minecraft days
days: [ 19, 23, 29 ] # List of days (as multiples) when ignored day is active
cause: # Ignored day cause (death type)
- ALL # Ignore all death type
#- LAVA
#- FALL
#- etc.
# Add ::EXCLUDE in back of death type to exclude that death type
############ INCREASE DEATH SETTINGS ############
increase: # Increase HP player when they die
enabled: true # true or false, when true, player can increase their HP
must_difference: true # (true/false) when true, player who had died with increase cause before, cannot used increase with same cause again
# when false, player always increase HP with increase cause, even repeat death with same cause type, did not record their death data
cause: # Increase death type and Increase amount, (TYPE::AMOUNT)
- ALL::2 # Increase all death type
#- LAVA::4
- FALL::1 # If using ALL but need custom increase amount for some death type, you can add below like this
# - etc.
# Change the number to EXCLUDE in back of death type to exclude that death type (Ex LAVA::EXCLUDE)
day: # Increase day settings
enabled: false # true or false, when true, increase day is active
must_difference: true # (true/false) when true, player who had died with increase day cause before, cannot increase with same day cause again
# when false, player always increase HP with increase day cause, even repeat death with same day cause type, did not record their death data
deActiveIgnore: false # true or false, when true, ignore death not active when increase day
deActiveDecrease: false # true or false, when true, decrease death not active when increase day
deActiveIgnoreDay: false # true or false, when true, ignore day not active when increase day is active
deActiveDecreaseDay: false # true or false, when true, decrease day not active when increase day is active
type: "minecraft" # "real" for real-world days, "minecraft" for minecraft days
days: [ 11, 13, 17 ] # List of days (as multiples) when increase day is active
cause: # Increase day cause (death type and increase amount), (TYPE::AMOUNT)
- ALL::10 # Increase all death type
- LAVA::14 # If using ALL but need custom increase day amount for some death type, you can add below like this
#- FALL::4
# - etc.
# Change the number to EXCLUDE in back of death type to exclude that death type (Ex LAVA::EXCLUDE)
############ DECREASE DEATH SETTINGS ############
decrease: #decrease HP player when death with certain type
enabled: false # true or false, when true, player can decrease their HP
must_difference: false # (true/false) when true, player who had died with decrease cause before, cannot decrease with same cause again
# when false, player always decrease HP with decrease cause, even repeat death with same cause type, did not record their death data
debt: true # (true/false) when true, player when got decrease but don't have enough HP, when they increase HP their HP will use to pay debt
cause: # Decrease death type and Decrease amount, (TYPE::AMOUNT)
- ALL::4 # Decrease all death type
- PLAYER_ATTACK::6 # If using ALL but need custom decrease amount for some death type, you can add below like this
- FALL::EXCLUDE
#- etc.
# Change the number to EXCLUDE in back of death type to exclude that death type (Ex PLAYER_ATTACK::EXCLUDE)
day: # Decrease day settings
enabled: false # true or false, when true, decrease day is active
must_difference: false # (true/false) when true, player who had died with decrease day cause before, cannot decrease with same day cause again
# when false, player always decrease HP with decrease day cause, even repeat death with same day cause type, did not record their death data
deActiveIgnore: false # true or false, when true, ignore death not active when decrease day
deActiveIncrease: false # true or false, when true, increase death not active when decrease day
deActiveIgnoreDay: false # true or false, when true, ignore day not active when decrease day is active
deActiveIncreaseDay: false # true or false, when true, increase day not active when decrease day is active
type: "minecraft" # "real" for real-world days, "minecraft" for minecraft days
days: [ 5, 7 ] # List of days (as multiples) when decrease day is active
cause: # Decrease day cause (death type and decrease amount), (TYPE::AMOUNT)
- ALL::16 # Decrease all death type
- PLAYER_ATTACK::18 # If using ALL but need custom decrease day amount for some death type, you can add below like this
#- FALL::EXCLUDE
#- etc.
# Change the number to EXCLUDE in back of death type to exclude that death type (Ex PLAYER_ATTACK::EXCLUDE)
############ SEASON SETTINGS ############
season: # Season settings, add season days to death data player, so player can death with same cause again when season change
enabled: true # true or false, when true, season is active
type: "real" # "real" for real-world day per season, "minecraft" for minecraft day per season
day: 30 # day (as multiples) when season is change
resetWorldDay: false # true or false, when true, reset all world day and irl world setting day back to 0 when season is change
############ PERMISSION SETTINGS ############
permissionsAllPlayer: # Give permission to all player, OP can use command without permission
reload: false # allow reload command to all player
setConfig: false # allow setConfig command to all player
setMaxHealth: false # allow setMaxHealth command to all player
viewHealth: false # allow viewHealth command to all player
viewDeathData: true # allow viewDeathData command to all player
viewDebtData: true # allow viewDebtData command to all player
resetHealth: false # allow resetHealth command to all player
matchHealth: false # allow matchHealth command to all player
removeDeathData: false # allow removeDeathData command to all player
removeDebtData: false # allow removeDebtData command to all player
transferHealth: true # allow transferHealth command to all player
withdrawHealth: true # allow withdrawHealth command to all player
help: true # allow help command to all player
############ NOTIFICATION SETTINGS ############
notifications:
defaultDeathMessage: false # true or false, when false, another player won't receive default death message
player:
maxHealth: "&bYou&f have reached the&c maximum health limit&f."
minHealth: "&bYou&f have reached the&c minimum health limit&f."
banReason: "&bYou&f have been&c banned&f due to low health"
kicked: "&bYou&f have been&c kicked&f due to low health"
ignored: "&fDied with &c{cause}&f now&c not increased&f HP"
ignoredSameWay: "&cCan't&f ignoring again cause&c you died&f with&c same way"
increased: "&bYou&a increased &d{increase}&f health cause: &c{cause}"
increaseSameWay: "&bYou&c don't increased health&f with death same way"
decreased: "&bYou&c decrease &d{decrease}&f health cause: &c{cause}"
decreaseSameWay: "&bYou&c don't decreased health&f with death same way"
debtPaidOff: "&bYou&f have paid off&c {debtPaid}&f health debt"
debtReduced: "&bYou&f have reduced&c {debtPaid}&f health debt, now&c {debtLeft}&f health debt left"
debtAdded: "&bYou&f have added&c {debtAdded}&f health debt, now&c {debtLeft}&f health debt you must pay"
# Warning messages for special days
warning:
ignoredDay: "&6⚠ &eToday is an &6Ignored Day&e! Deaths won't affect your HP!"
increaseDay: "&6⚠ &eToday is an &aIncrease Day&e! Get extra HP on death!"
decreaseDay: "&6⚠ &eToday is a &cDecrease Day&e! Be careful, you'll lose more HP on death!"
seasonChange: "&6⚠ &eSeason changed! Reset your death data!"
logServer:
maxHealth: "&b{name}&f have reached the&c maximum health limit&f."
minHealth: "&b{name}&f have reached the&c minimum health limit&f."
increased: "&b{name}&a increase&d {increase}&f health by&b {cause}"
decreased: "&b{name}&c decrease&d {decrease}&f health cause:&c {cause}"
banReason: "&b{name}&f has been&c banned&f due to low health"
Features
- Ignore Death: Ignored death so player could not get Increase or Decrease.
- Health Increase: Players increase health upon death.
- Health Decrease: Players can lose health upon death if configured.
- Ignore, Increase, and Decrease Death Types: Specify certain death types to ignore, increase, or decrease health.
- All Type Death Ignoring, Increasing, and Decreasing: Use
ALL to ignore, increase, or decrease health for all death causes.
- Increase and Decrease Amount: Specify Amount to increase or decrease health on certain death types.
- Ignore, Increase, and Decrease Exclude Death Type: EXCLUDE some death causes from being used in certain death types.
- Day Ignored, Increase, and Decrease: Allows configuration of specific days when death ignore, increase, and decrease is active, regardless of the cause of death with some settings. If you only want to decrease health on specified days without affecting player health on other days, set
per_death in the increase or decrease settings to 0.
- DeActive Another Death In Certain Days: Allow deactivating another death type in certain days.
- Same Way Death: If it must difference is false, and the death is the same as the last death, the player will not increase or decrease health again.
- Customizable Priority: Set a priority for different death types to determine the order of health modification.
- Season Change: Configure season settings to make players increase or decrease health with same cause again when season change.
- Day Reset: Configure day reset settings in when season change to make day back to 0.
- Customizable Messages: Tailor the messages players receive upon death.
- First Join Health: Set the health players start with on their first join.
- Maximum Health Limit: Set a maximum health limit that players can reach.
- Minimum Health Limit/Ban: Set a minimum health limit, or ban players when their health drops to zero.
- Debt Health: Make players incur debt if their health is below the minimum or below 0 when it decreases.
- Health Item: Customize the health item settings, and make it so that the item cannot be used for crafting specific items.
- Health Item Drop: Drop a health item when a player reaches the maximum health limit upon got increase.
- First Time Setup: Set the first day Plugin setup in this server (
System.currentTimeMillis()), don't change this section if you don't know what you are doing.
- Day Check Period: Set the day check period in this server(in seconds), lower value is more accurate but may cause lag.
- World Day Settings: Set the ticks per day in different worlds to used in ignored day, increase day, and decrease day.
- Configuration Reload: Reload the plugin configuration without restarting the server with commands.
- Set Config Using Command: Set a specific configuration value using a command.
- Health Matching: Match the health of a specified player or all players based on their death data with commands.
- Transfer Health: Transfer the health to another player using commands.
- Withdraw Health: Withdraw health item from using commands.
- Permissions: Set specific permissions for different commands to All Players, so players can run the commands without having the
dp.* permission(at your own risk).
Event Listeners
- PlayerJoinListener: Sets the player's start health when they join the server for the first time.
- HealthItemListener: Handles Health Item logic.
- PlayerDeathListener: Handles health modification logic upon player death.
Contributing
Contributions are welcome!
While DeathPulse provides a unique twist on Minecraft gameplay, there is always room for improvement. Future enhancements could include more granular control over health modifications and additional configurable events. Your feedback and contributions would be invaluable in making this plugin even better!
Enjoy your time with DeathPulse!
评论 0
登录后参与评分
还没有评论,来抢沙发吧