
TrialChamberPro
Because Trial Chambers deserve better than being a "one and done" dungeon.
1.7K
20
Список изменений
This plugin version is compatible with Minecraft 26.X.X
1.4.0 - 2026-04-26
Added
- Phase 2 of the public extension API — three more seams aimed at premium add-on modules and third-party integrations. No breaking changes; all existing behavior preserved when no listener / service is registered.
DatabaseManageropened for extension. Class is nowopen(was final) and thepluginconstructor parameter isprotectedso subclasses in other packages can access it. The instance is auto-registered with Bukkit'sServicesManagerat TCP startup so consumers can resolve it viaBukkit.getServicesManager().load(DatabaseManager::class.java). Designed for the planned premium "Network Sync" module that adds Postgres / MariaDB / Redis backends. (Note: TCP itself currently still references its owndatabaseManagerfield directly throughout its own codebase, so subclass replacement only takes effect for callers that explicitly resolve via the services manager — full runtime substitution at every call site is planned for a future major version.)ChamberResetEvent.snapshotOverride(mutableByteArray?) — pre-reset hook lets listeners substitute a different snapshot for a single reset cycle without persistently modifying the chamber's on-disk snapshot. Bytes must be a gzip-compressed serializedSnapshotData(TCP's native snapshot format). NewSnapshotManager.loadSnapshotFromBytes(bytes, contextLabel)deserializes the override; falls back to the on-disk snapshot with a logged warning if the override fails to load. Designed for premium / third-party "schematic injection" or "instance variant" workflows.WildSpawnerResolverSPI inapi/— pluggable lookup for the question "should this wild trial spawner spawn custom-plugin mobs, and if so, which provider + mob ids?". Lifts the long-standing limitation that TCP's Custom Mob Provider only worked inside registered chambers. Implementations register as a Bukkit service (ServicesManager.register(WildSpawnerResolver::class.java, ...)); TCP'sSpawnerWaveListenerconsults the active resolver on every wild-spawner spawn observation. Returning a non-nullConfig(providerId, normalIds, ominousIds)triggers TCP's existing replace-after-spawn logic — vanilla mob removed the same tick, custom provider mob spawned at the same location, wave tracking and key drops preserved. The seam lives in free TCP; the resolver implementation will ship in the planned premium "Wild Custom-Mob Spawners" module (per the v1.3.1 architectural boundary: trial-spawner-only is the line, wild-spawner custom mobs are premium territory).SpawnerPresetManager.PRESET_ID_KEY_NAME+ automatic PDC tagging — every item produced bySpawnerPresetManager.getItem(i.e. given out via/tcp give <preset>) now carries atcp:preset_idPersistentDataContainer tag with the source preset's id.SpawnerPresetPlaceListener— copies thetcp:preset_idtag from a placed trial-spawner item onto the resulting block'sTileState. LetsWildSpawnerResolverimplementations identify which preset a placed wild spawner originated from, even after the source ItemStack is gone. Tag survives chamber resets, chunk unloads, and world reloads via Minecraft's standard TileEntity persistence. Vanilla/give minecraft:trial_spawneritems (no tag) are ignored.
Added — MiniMessage support
- First-class MiniMessage support across every user-facing text surface. New
MessageParserutility (utils/MessageParser.kt) translates rawmessages.ymlentries through MiniMessage as the primary syntax while remaining fully backwards-compatible with legacy&colour/format codes (and&#RRGGBBhex). Existingmessages.ymlfiles render unchanged; users adopt MM syntax entry-by-entry on their own schedule. Mixed input works too —&aHello <gradient:#ff0000:#0000ff>world</gradient>renders correctly. - MM features now usable in TCP messages that legacy
&codes can't express:- Gradients:
<gradient:#ff5500:#0000ff>Sunset to ocean</gradient> - Click events:
<click:run_command:'/tcp menu'>[Open menu]</click> - Hover tooltips:
<hover:show_text:'Bonus active'><gold>★</gold></hover> - Custom fonts (resource-pack supplied):
<font:server:fancy>...</font> - Cleaner hex syntax:
<#FF5500>instead of&#FF5500
- Gradients:
- New
TrialChamberPro.getMessageComponent(key, ...): Component— companion to the existinggetMessage()String method. Returns a fully-styled Adventure Component preserving all MiniMessage features (gradients, click/hover, fonts) end-to-end throughPlayer.sendMessage(Component). - All ~349
sendMessagecall sites in TCP migrated from the legacy String path togetMessageComponentso chat messages get full MiniMessage fidelity. Includes boss bar text, chat notifications (vault opened, chamber entered, reset warnings, spectator messages, discovery announcements, wave completion), death messages, and all command feedback. - GUI helpers (
getGuiText,getGuiLore) now route through MessageParser — item names and lore in all 18 admin GUI views support full MM fidelity. - Documentation updated (docs/configuration/messages.yml.md) — comprehensive coverage of both syntaxes side-by-side, mixed-format examples, and MM-only feature documentation. The
messages.ymlresource header explains the two formats with examples. - Conflict-free with other plugins — TCP parses its own messages internally; chat plugins (DiscordSRV, EssentialsXChat, ChatControl) only intercept
AsyncChatEvent(player-typed chat), not plugin-sent notifications, so there's no double-processing risk. This is the same pattern MythicMobs, EcoEnchants, LuckPerms, and CMI use.
Fixed
- Trial-spawner wave size off-by-one (the v1.3.2 follow-up). v1.3.2 introduced
SpawnerWaveManager.computeExpectedMobsto read the spawner's actualtotal_mobs/total_mobs_added_per_playerconfig instead of hard-coding 6. The formula wasbase + perPlayer × players, but Mojang's actualTrialSpawnerDataformula isbase + perPlayer × max(0, players - 1)— the FIRST detected player gets the base count, each ADDITIONAL player adds the per-player bonus. The off-by-one over-counted byperPlayerper nearby player, producing the user-reported bug "spawner has 20 configured, bar shows 1/30, wave actually ends at 20". Plugin now matches vanilla exactly:floor(base + perPlayer × additional)whereadditional = max(0, players - 1). Also switchedceil→floorto match Mojang's rounding. - Secondary fallback bug surfaced by the same code path. When Paper's
state.trackedPlayersreturned empty (e.g. between waves), the recompute fell back towave.participatingPlayers.size— which counts players within the boss-bar detection radius (default 20 blocks), not within the spawner'srequiredPlayerRange(default 14). With more players in the boss-bar radius than vanilla actually tracked, the fallback could inflate the result beyond whatstate.trackedPlayers.sizewould have produced. Fallback is now1so it can never exceed what the authoritative API would say.
Changed
ResetManager.resetChambernow consultsChamberResetEvent.snapshotOverrideafter firing the pre-event. If non-null, the override bytes are restored instead of the on-disk snapshot; if the override fails to load, the on-disk snapshot is used and a warning is logged. Internal helperrestoreFromSnapshotBlocksextracted to share the BlockRestorer call between the on-disk and override paths.SpawnerWaveListenergains a wild-spawner-replacement branch that fires immediately afterconfigureWildSpawnerCooldown. When noWildSpawnerResolverservice is registered (the default in free TCP), the branch is a single nullable lookup and a return-false — zero behavior change for end users.TrialChamberPro.onEnableregistersSpawnerPresetPlaceListeneralongside the existing listener block, and registers theDatabaseManagerinstance withServicesManagerimmediately after it initializes.TrialChamberPro.getMessageandgetMessageComponentshare a new private helperrawMessageWithPrefixfor placeholder substitution + chat-prefix logic. Behavior is identical to v1.3.x but the Component path now exists alongside the String path.SpawnerWaveManager's private boss-bargetMessageComponenthelper now delegates toplugin.getMessageComponentso boss bars inherit the same MM-aware parsing as chat messages. The localLegacyComponentSerializerimport is removed.
Файлы
TrialChamberPro-1.4.0-mc26.jar(12.55 MiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.4.0-mc26
Загрузчики
FoliaPaperPurpur
Версии игры
26.1–26.1.2
Загрузок
20
Дата публикации
1 нед. назад
