TotemPractice
具有可配置难度和回合的图腾生存训练插件
» 简介
TotemPractice 是一款专注于图腾生存的训练插件。
玩家从图形用户界面(GUI)中选择一种难度,并在配置好的比赛地点开始一局回合。在回合期间,他们会获得全套图腾物品,并定期受到致命伤害。
每次成功触发图腾都会增加玩家的分数。回合将持续进行,直到玩家未能抵挡住一次攻击为止。
不同难度会控制攻击间隔和分数倍率,从而练习不同的反应速度。
» 难度
每种难度定义了以下参数:
- 致命攻击间隔
- 副手攻击间隔(当启用
offhand-only时生效) - 分数倍率
- 图腾是否仅能从副手使用(
offhand-only) - 是否在随机栏位中隐藏单个图腾(
random-totem)
» 回合
在回合开始前,会在动作栏显示倒计时,并将玩家传送至配置好的比赛地点。
在回合期间:
- 自动提供图腾
- 无法丢弃图腾
- 死亡后保留背包内容
- 当前分数和回合统计信息可通过 PlaceholderAPI 获取
回合结束时,最终分数将以标题形式显示。
» 命令
| 命令 | 描述 | 权限 |
|---|---|---|
/totempractice |
打开难度选择 GUI | totempractice.use |
/totempractice set match |
设置比赛地点 | totempractice.set |
/totempractice set lobby |
设置大厅重生地点 | totempractice.set |
/totempractice reload |
重载配置和消息 | totempractice.reload |
» 玩家隐藏
处于回合中的玩家对外部玩家不可见,反之亦然。
启用 hide.match-players-from-each-other(默认开启)后,不同回合的玩家彼此不可见且听不到对方的声音。此功能需要 PacketEvents。
启用 hide.match-players-in-tab 后,彼此隐藏的玩家也会从标签页列表中移除。此功能需要 PacketEvents。
» 占位符
需要 PlaceholderAPI。
该扩展可在 totempractice 和 tp 两个命名空间下使用。
| 占位符 | 描述 |
|---|---|
%totempractice_state% |
当前状态:none 或 round |
%totempractice_score% |
当前分数 |
%totempractice_totems_used% |
本回合已使用的图腾数量 |
%totempractice_difficulty% |
当前难度 |
%totempractice_hit_interval% |
致命攻击之间的秒数 |
%totempractice_score_multiplier% |
当前分数倍率 |
%totempractice_offhand_only% |
本回合是否要求使用副手图腾 |
%totempractice_random_totem% |
图腾是否隐藏在随机栏位中 |
%totempractice_next_hit% |
距离下一次致命攻击的秒数 |
» 依赖
- Java 25
- Minecraft
1.21.11,26.1或26.2 - 可选:PacketEvents 用于玩家隐藏功能
- 可选:PlaceholderAPI 用于占位符功能
» 构建
gradlew build
享受 TotemPractice!
TotemPractice
Totem survival training plugin with configurable difficulties and rounds
» About
TotemPractice is a training plugin focused on totem survival.
Players select a difficulty from a GUI and start a round at a configured match location. During the round, they receive a full inventory of totems and are periodically hit with lethal damage.
Each successful totem pop increases the player's score. The round continues until the player fails to survive a hit.
Difficulties control the time between hits and the score multiplier, allowing different levels of reaction speed to be practiced.
» Difficulties
Each difficulty defines:
- Lethal hit interval
- Offhand hit interval (used when
offhand-onlyis enabled) - Score multiplier
- Whether totems only work from the offhand (
offhand-only) - Whether a single totem is hidden in a random slot (
random-totem)
» Rounds
Before a round starts, an actionbar countdown is shown and the player is teleported to the configured match location.
During a round:
- Totems are automatically provided
- Totems cannot be dropped
- Inventory is kept on death
- The current score and round statistics can be accessed through PlaceholderAPI
When the round ends, the final score is displayed in a title.
» Commands
| Command | Description | Permission |
|---|---|---|
/totempractice |
Open the difficulty selection GUI | totempractice.use |
/totempractice set match |
Set the match location | totempractice.set |
/totempractice set lobby |
Set the lobby respawn location | totempractice.set |
/totempractice reload |
Reload configuration and messages | totempractice.reload |
» Player Hiding
Players in a round are hidden from players outside the round and vice versa.
With hide.match-players-from-each-other enabled (default), players in different rounds cannot see each other or hear their sounds. This requires PacketEvents.
With hide.match-players-in-tab enabled, players hidden from each other are also removed from the tab list. This requires PacketEvents.
» Placeholders
Requires PlaceholderAPI.
The expansion is available under both totempractice and tp.
| Placeholder | Description |
|---|---|
%totempractice_state% |
Current state: none or round |
%totempractice_score% |
Current score |
%totempractice_totems_used% |
Totems used in the current round |
%totempractice_difficulty% |
Current difficulty |
%totempractice_hit_interval% |
Seconds between lethal hits |
%totempractice_score_multiplier% |
Current score multiplier |
%totempractice_offhand_only% |
Whether the round requires an offhand totem |
%totempractice_random_totem% |
Whether totems are hidden in a random slot |
%totempractice_next_hit% |
Seconds until the next lethal hit |
» Requirements
- Java 25
- Minecraft
1.21.11,26.1, or26.2 - Optional: PacketEvents for player hiding
- Optional: PlaceholderAPI for placeholders
» Build
gradlew build
Enjoy TotemPractice!
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TotemPractice
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
? 架构与改进
-
模块化子命令系统 (
/totempractice,/tp)- 将命令处理重构为解耦的子命令,实现
Enableable生命周期:/tp gui— 打开难度选择 GUI。/tp reload— 重新加载配置文件并显示格式化后的游戏内反馈。/tp set lobby— 通过嵌套子命令(SetSubCmd)设置大厅出生点。/tp set match— 设置比赛竞技场出生点。
- 添加了动态标签补全功能,支持在所有参数的输入前缀过滤。
- 移除了
settings.yml中过时的命令样板代码和配置项。
- 将命令处理重构为解耦的子命令,实现
-
封装的玩家状态管理 (
PlayerStateManager)- 引入
PlayerStateManager以保存和恢复玩家状态(包括物品栏、游戏模式、生命值、饥饿值、药水效果)。 - 在回合结束、玩家死亡、断开连接或传送时自动恢复原始状态。
- 移除了回合结束时执行旧版控制台命令的做法,改为使用原生状态恢复机制。
- 引入
-
动态权限与生命周期
- 引入了类型安全的
PluginPermission枚举,在运行时动态注册权限(totempractice.use、totempractice.reload、totempractice.set.*),并在插件禁用时干净地注销权限。 - 移除了
plugin.yml中冗余的静态权限声明。
- 引入了类型安全的
-
消息与格式化 (
MessageUtil)- 新增
<prefix>占位符支持,同时兼容{prefix}和%prefix%。 - 在所有命令处理器中集中处理 MiniMessage 解析及错误报告。
- 新增
- 重构配置以适配 Configura 2.1 与 Strata 2.0:
- 使用纯 POJO 模型(
settings/、messages/、gui/、backed/)替换了旧版区块包装器和配置类。 - 添加了
TotemPracticeConfig外观类,支持自动迁移和模式注释。 - 移除了冗余的资源文件(
config.yml、messages.yml、guis.yml、backed.yml)。
- 使用纯 POJO 模型(
- 引入
MessageUtil: 集中处理 MiniMessage 解析、占位符处理和消息分发(移除了旧版ColorAPI)。 - 添加 Gradle 版本目录 (
libs.versions.toml): 将依赖项和插件移至版本目录,并使用捆绑包(adventure、configura、strata)。 - 依赖项与平台更新: 将平台依赖项切换为
spigot-api26.3-R0.1-SNAPSHOT,在shadowJar中进行库重定位,并简化 PacketEvents 的标签页处理逻辑。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
使床在所有维度中爆炸的模组
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
自定义你的Minecraft头像!
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
评论 0
登录后参与评分
还没有评论,来抢沙发吧