一款允许玩家单独切换 PvP 状态的模组,同时提供了一些我认为你可能觉得实用的额外功能。我也知道有不少模组实现了类似的功能,但我觉得自己可以做出超越简单开关的效果。
- PvP 偏好设置:玩家可以选择为自己禁用或启用 PvP
- 彩色名称标签:使用原版队伍系统来展示玩家的 PvP 状态
- 战斗标记:处于标记期间无法进行切换,且在标记激活时因任何原因断开连接将导致立即死亡
- 全局 PvP:强制为所有玩家开启或关闭服务器范围的 PvP;这具有最高优先级
- 宠物保护:保护所有被驯服的生物免受 PvP 关闭的玩家攻击(不考虑宠物主人的 PvP 状态)
- 在其他维度强制 PvP:你可以强制在特定维度中启用 PvP
- LuckPerms 支持:允许你自定义各项功能的访问权限
- 可配置性:部分选项可以进行配置;关于哪些内容可配置的信息,请向下滚动至配置部分
此模组忽略
server.properties中的pvp设置。请使用模组的最新版本,因为旧版本可能存在错误或缺少功能,毕竟我的开发并非完美无缺。请务必查看依赖项部分。
- Fabric API
- LuckPerms (如果你不打算自定义权限,则为可选)。
剧透警告
| 命令 | 描述 | 权限节点 |
|---|---|---|
/pvp |
切换你的 PvP 开启或关闭状态。 | pvptoggle.player.toggle |
/pvp <player> |
更改某玩家的 PvP 偏好设置。 | pvptoggle.op.other.toggle |
/pvp <player> timeout <duration> |
阻止某玩家在指定时长内(以秒为单位)进行切换。 | pvptoggle.op.other.timeout |
/pvp status |
显示你当前的 PvP 状态。 | pvptoggle.player.status |
/pvp status <player> |
查看有关某玩家 PvP 状态的详细信息列表。 | pvptoggle.op.other.status |
/pvp status flag |
切换显示或隐藏你的 PvP 标记计时器。 | pvptoggle.player.status |
/pvp global <state> <shouldBroadcast> |
将全局 PvP 状态设置为 on、off 或 neutral。<shouldBroadcast> 参数(true 或 false)用于决定是否广播该消息。 |
pvptoggle.op.global |
/pvp reload |
重新加载配置文件。 | pvptoggle.op.reload |
此外还有 pvptoggle.op.exempt 权限节点,拥有该权限的玩家将对惩罚免疫,例如不会被标记、不会进入冷却时间等。
再次强调,正如在依赖项部分所述,如果你不打算通过 LuckPerms 等其他模组来自定义权限,则可以完全忽略这些权限节点。 所有标记为“player”的节点默认对所有玩家开放,而标记为“op”的节点则仅对拥有 2 级或更高操作员权限的玩家开放。
剧透警告
配置文件路径:config/pvptoggle/pvp-toggle.json (启动时生成)。
{
// 警告:请勿复制此示例 JSON
// 切换冷却时间
"toggle_cooldown": 120.0,
// 参与战斗后被标记的持续时间
"combat_flag_duration": 60.0,
// 新玩家的默认 PvP 偏好设置
"default_pvp_preference": true,
// 控制台反馈
"broadcast_to_other_ops": false,
// 这些配置项的含义不言自明
"punish_combat_log": true,
"protect_tameables": true,
"force_pvp_in_other_dimensions": false,
"team_colors": true,
"prevent_item_pickup_when_pvp_off": false,
"forced_pvp_in_other_dimensions": {
"minecraft:overworld": false,
"minecraft:the_nether": false,
"minecraft:the_end": false
},
/* 例如,将 "tpa" 加入命令黑名单列表,将会屏蔽所有包含 "tpa" 这个词的命令。
你也可以单独屏蔽特定的命令,如 "tpaaccept",而无需屏蔽所有相关命令 */
"blacklisted_commands_when_flagged": [
"tpa",
"home"
]
}
除 toggle_cooldown 和 combat_flag_duration 外,所有设置均为布尔值(true/false),这两项为浮点数,取值范围从 0.0 到最大 9999.0 秒。
编辑数值后重启服务器,或使用 /pvp reload 命令应用更改。如果 JSON 文件格式出错,请删除该文件以让其重新生成。
感谢您下载本模组。如果您在 CurseForge 模组页面的评论区遇到任何问题,请务必反馈给我,因为目前这是我能收到反馈的唯一途径。 您也可以通过分享本模组来支持我。当看到有人在使用并从中受益时,无论人数多少,都会极大地激励我继续开发。
A mod that lets players toggle PvP individually, while offering some neat extra features that I reckon you may find useful. I am also aware that quite a few mods do something similar, but I felt like I could make something beyond a simple toggle.
- PvP preferences: Players choose whether to disable or enable PvP for themselves
- Colored name tags: Uses vanilla's teams to show off players' PvP states
- Combat flagging: While flagged, toggling is disabled, and disconnecting for any reason while it's active will result in being immediately killed
- Global PvP: Force PvP on or off for all players server-wide; this takes priority over everything else
- Pet protect: Protect all tamed mobs from players whose PvP is off (the pet owner’s PvP state is not factored in)
- Forced PvP in other dimensions: You can force PvP in specific dimensions
- LuckPerms support: Allows you to customize accessibility to things
- Configurability: Some stuff can be configured; for info on what is configurable, go down to the configuration section
This mod ignores the
pvpsetting inserver.properties. Stick to the newest versions of the mod, as older versions may have bugs or lack features as my work is not perfect. Make sure to look at the dependencies section as well.
- Fabric API
- LuckPerms (Optional if you don't care about customizing permissions).
Spoiler
| Command | Description | Permission Node |
|---|---|---|
/pvp |
Toggles your PvP on or off. | pvptoggle.player.toggle |
/pvp <player> |
Change a player's PvP preference. | pvptoggle.op.other.toggle |
/pvp <player> timeout <duration> |
Prevent a player from toggling for a specified duration (in seconds). | pvptoggle.op.other.timeout |
/pvp status |
Displays your current PvP status. | pvptoggle.player.status |
/pvp status <player> |
View a detailed info list about a player's PvP state. | pvptoggle.op.other.status |
/pvp status flag |
Toggle displaying your PvP flag timer on or off. | pvptoggle.player.status |
/pvp global <state> <shouldBroadcast> |
Set the global PvP state to on, off, or neutral. The <shouldBroadcast> argument (true or false) is for whether to announce it or not. |
pvptoggle.op.global |
/pvp reload |
Reloads the configuration file. | pvptoggle.op.reload |
There's also the pvptoggle.op.exempt permission node that marks you as immune against penalties such as being flagged, being put on cooldown, etc.
Once again, as was said in the dependencies section, you can completely ignore permission nodes if you do not care for customizing them via another mod like LuckPerms. All nodes labeled as "player" are available to everyone by default, while ones labeled as "op" are available to anyone with an operator permission level of 2 or higher.
Spoiler
Configuration file path: config/pvptoggle/pvp-toggle.json (Generated on launch).
{
// WARNING: DO NOT COPY THIS EXAMPLE JSON
// Cooldown for toggling
"toggle_cooldown": 120.0,
// How long one is flagged for after engaging in combat
"combat_flag_duration": 60.0,
// Default PvP preference for new players
"default_pvp_preference": true,
// Console feedback
"broadcast_to_other_ops": false,
// These should be self-explanatory
"punish_combat_log": true,
"protect_tameables": true,
"force_pvp_in_other_dimensions": false,
"team_colors": true,
"prevent_item_pickup_when_pvp_off": false,
"forced_pvp_in_other_dimensions": {
"minecraft:overworld": false,
"minecraft:the_nether": false,
"minecraft:the_end": false
},
/* For example, putting "tpa" in the list of commands to blacklist will blacklist any command with the word "tpa" in it.
You are also able to blacklist specific commands such as "tpaaccept" without outright blacklisting every related command */
"blacklisted_commands_when_flagged": [
"tpa",
"home"
]
}
Every setting is a boolean value (true/false) besides toggle_cooldown and combat_flag_duration, which are floats that start from 0.0 to a maximum of 9999.0 seconds.
Edit the values and restart the server or use /pvp reload to apply said changes. Delete the JSON file if it ever becomes malformed to let it regenerate.
Thank you for downloading. I would really appreciate it if you could report any potential issues you encounter in the comments section of the CurseForge mod page, as I currently have no other way to receive feedback. You can also support me by sharing the mod around, as it really motivates me to work on it when there are people benefiting from its usage, no matter how small.
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
下载 PvP Toggle
1.6.1
- 修复了无条件移除玩家队伍的问题
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成







评论 0
登录后参与评分
还没有评论,来抢沙发吧