2.4.0(Test)
Compatibility
Changes
正在筹备基于Gost玩法制作的PVE逃亡插件(也可能作为Gost的新玩法存在),敬请期待!
I'm preparing a PVE escape plugin based on the Gost gameplay (it might also exist as a new mode in Gost), stay tuned!
2.4.0 — 2026-11
点击看中文
✨ 2.4.0 更新日志
本版本不新增玩法,专注把此前「已声明但未落地」的能力补齐:可复现构建、Folia 兼容、ActionBar 兼容、六语言真正生效。
🔧 构建可复现
- 修复
build.gradle:源码在main/与resources/,不是 Gradle 默认的src/main/java;补上此前缺失的 Vault 依赖 - 此前
gradle build产不出可用 jar,发版依赖手工命令。现在一条命令复现,且构建出的 class 清单与原 2.3.3 jar 完全一致
⚙️ Folia 兼容修复
- 根因:
BukkitRunnable.runTask*()内部同样调Bukkit.getScheduler(),Folia 上一律抛异常 —— 此前只修了直接调用,全项目 17 处(GameManager独占 7 处核心循环)实际都不通 - 新增
ServerCompat.runLaterForEntity/runTimerForEntity,反射 Folia 的EntityScheduler(runDelayed/runAtFixedRate) - 母体水晶发光、旁观边界检查、守护与猎魔人特效循环、烟花引爆、ActionBar 改为绑定实体所属区域线程,不再走全局调度
- 修正平台探测:不再用
getGlobalRegionScheduler判断(Paper 系后来也加了这个方法,会把 Purpur 26.x 误判成 Folia),改用RegionizedServer类作为强信号
💬 ActionBar 修复(Spigot 上原为坏的)
- 原代码直调 Paper 专有的
player.sendActionBar(String),Spigot 抛NoSuchMethodError;而兜底写的是catch (Exception)—— 抓不到Error - 改为按优先级探测并缓存通道:Adventure → BungeeCord 聊天通道 → 聊天栏兜底。这一层是为新版服务端准备的,Bungee 聊天 API 正在被移除
- 影响:2.3.3 的「旁观复活倒计时」在 Spigot 上此前实际不可用
🌐 多语言(六语言真正生效)
- 语言 key 66 → 599,全项目玩家可见文案不再有硬编码中文
- 新增
/gost lang <locale>与/gost lang reset,立即生效,无需 reload - 缺失 key 四级回退:玩家语言 → 服务器默认 → 内置中文 → key 本身(暴露漏配而不是静默吞掉)
- 语言文件自动补齐:新增 key 自动追加到
plugins/Gost/lang/*.yml,保留你已改的译文与注释,只追加不重写 - 修复
en_US.yml一处未转义引号导致的 YAML 解析失败 —— 曾使英文只剩旧版 66 条 - 新增
tools/check_lang.py:六语言键集一致 + 行级语法校验 + 代码 key 覆盖,已接入 CI
🎲 随机地图
- 每局从已启用区域中随机选图(
area.random-each-game,默认开启) /gostadmin load <名称>指定的区域只对下一局生效,之后自动恢复随机- 旧版实际上只在「没有选中区域」时随机一次,之后每局都复用同一张图
💀 死亡状态可配(默认改回隐身)
- 新增
death-state.mode:invisible(默认,隐身)/spectator(旁观) - 隐身态:保持生存、回满血、施加隐身,不限制移动 —— 即 2.3.3 之前的行为
- 旁观态:切入旁观模式并启用边界检查 —— 即 2.3.3 的行为
- 两种状态都会登记为「已淘汰」,不可被感染、不会被选为目标,复活流程一致
- 玩家真实死亡并重生时,隐身态会重新施加隐身;旁观态保持旁观
🩺 运行期自检
- 新增
/gostadmin selftest:单人、不用开局即可验证平台探测、语言加载与六语言一致性、配置版本、Vault 经济、区域配置、道具工厂、ActionBar 通道、以及全局与实体两种调度 - 逐项打勾,末尾给出「通过 / 失败 / 警告」统计
📊 运维
- 接入 bStats 匿名统计(依赖已重定位进插件自己的包,不与其他插件冲突)。插件 ID 为
0时不上报任何数据,注册后填入真实 ID 即生效 - 启动时异步检查 Modrinth 版本,有新版本提示在线管理员(
update-check.enabled可关闭) - 新增 CI:push 自动校验语言文件 + 构建,打
v*tag 自动建 Release
🐛 其它修复
- 选区粒子任务此前永不取消,每 5 tick 空转到服务器关闭
- 控制台现在可以执行
/gost start等管理员命令 /gostadmin load <名称> enable在区域已启用时不再报含糊的「已经启用或不存在」- 各子命令的重复文案(如「区域 X 不存在」出现 4 次)收敛为带参数的单一 key
📦 配置
- config version 34
- 新增
area.random-each-game、death-state.mode、update-check.enabled
⚠️ 升级提示
- 旧配置自动备份为
config_old_vXX.yml并迁移,原有设置不受影响 - 道具名称与队伍名仍为中文:它们同时被用作道具身份标识(
displayName.contains("中文名")),直接翻译会让监听器全部失配,需先做 PersistentDataContainer 改造 - 手改过
plugins/Gost/lang/*.yml的话无需删除重建,新 key 会自动追加到文件末尾
✨ 2.4.0 New & Fixed
This release adds no new gameplay. It closes the gap between what was claimed and what actually worked: reproducible builds, Folia support, ActionBar compatibility, and six languages that really take effect.
🔧 Reproducible build
- Fixed
build.gradle: sources live inmain/andresources/, not Gradle's defaultsrc/main/java; added the missing Vault dependency gradle buildcould not produce a usable jar before, so releases relied on manual commands. One command now reproduces the build, and the resulting class list matches the released 2.3.3 jar exactly
⚙️ Folia compatibility
- Root cause:
BukkitRunnable.runTask*()internally callsBukkit.getScheduler()too and throws on Folia — only direct calls had been fixed, so all 17 sites (7 core loops inGameManager) were broken - Added
ServerCompat.runLaterForEntity/runTimerForEntity, reflecting Folia'sEntityScheduler(runDelayed/runAtFixedRate) - Mother emerald glow, spectator boundary checks, guardian and hunter effect loops, firework detonation and ActionBar now bind to the owning entity's region thread instead of the global scheduler
- Fixed platform detection: no longer relies on
getGlobalRegionScheduler(Paper-family servers added it too, which misdetected Purpur 26.x as Folia); now requires theRegionizedServerclass
💬 ActionBar fix (was broken on Spigot)
- Code called Paper-only
player.sendActionBar(String); Spigot throwsNoSuchMethodError, and the fallback usedcatch (Exception)— which cannot catch anError - Now probes and caches a channel: Adventure → BungeeCord chat channel → chat fallback. This exists because the Bungee chat API is being removed on newer Paper
- Impact: the 2.3.3 spectator respawn countdown did not actually work on Spigot
🌐 Localization (six languages now effective)
- Keys grew 66 → 599; no hardcoded Chinese remains in player-facing text
/gost lang <locale>and/gost lang reset, effective immediately without a reload- Four-level fallback for missing keys: player locale → server default → builtin Chinese → the key itself
- Automatic file completion: new keys are appended to
plugins/Gost/lang/*.yml, preserving your translations and comments — append-only, never rewritten - Fixed an unescaped quote in
en_US.ymlthat broke YAML parsing (English used to fall back to 66 legacy keys) - New
tools/check_lang.py: key-set equality, line-level syntax validation and code coverage, wired into CI
🎲 Random map
- Every game randomly picks from enabled areas (
area.random-each-game, on by default) - An area chosen with
/gostadmin load <name>applies to the next game only, then randomization resumes - Previously randomization happened once and the same map was reused forever
💀 Configurable death state (invisibility restored as default)
- New
death-state.mode:invisible(default) orspectator - Invisible: stay in survival, full health, invisibility applied, movement unrestricted — the pre-2.3.3 behaviour
- Spectator: enter spectator mode with boundary checks — the 2.3.3 behaviour
- Both register as "eliminated", so they cannot be infected or targeted, and share the same respawn flow
- If a player really dies and respawns, invisibility is re-applied; spectator stays spectator
🩺 Runtime self test
- New
/gostadmin selftest: verifies platform detection, language loading and cross-language consistency, config version, Vault economy, area setup, item factories, the ActionBar channel, and both scheduler paths — without starting a game - Prints per-item results plus a passed / failed / warned summary
📊 Operations
- bStats anonymous metrics (relocated into the plugin's own package so it cannot clash with other plugins). While the ID is
0, no data is sent; set a real ID to enable - Async Modrinth version check on startup, notifying online admins (
update-check.enabledto disable) - CI: validate language files + build on push, automatic Release on
v*tags
🐛 Other fixes
- The selection particle task never cancelled itself, spinning every 5 ticks until server shutdown
- The console can now run admin commands such as
/gost start load <name> enableno longer reports the vague "already enabled or does not exist"- Duplicated subcommand messages (e.g. "area X does not exist" appeared 4 times) collapsed into single parameterized keys
📦 Config
- config version 34
- New:
area.random-each-game,death-state.mode,update-check.enabled
⚠️ Upgrade notes
- The old config is backed up as
config_old_vXX.ymland migrated automatically; existing settings are untouched - Item names and team names remain Chinese: they double as item identity (
displayName.contains("name")), so translating them would break every listener. A PersistentDataContainer refactor is required first - Hand-edited
plugins/Gost/lang/*.ymlfiles need no regeneration — new keys are appended automatically
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:SKYebqyY:cIRcXzTv"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:SKYebqyY:cIRcXzTv"
}

