
Список изменений
Allium v0.2.4a
Wiki: https://github.com/castledking/Allium/wiki
Highlights
- Vault softdepend crash fixed — Allium no longer crashes at startup when Vault is absent. All Vault-typed fields and method signatures were changed to
Object, with casts at call sites.VaultEconomyProvideris only created when Vault'sEconomyclass is actually loadable. TheFormatChatListeneris skipped entirely when Vault Chat isn't available. - PacketEvents softdepend crash fixed — Allium no longer crashes at startup when PacketEvents is absent. The
Glowcommand andGlowListenerare guarded behindisPacketEventsAvailable(), and theglowCommandfield was relaxed fromGlowtoObjectto prevent class loading. - CrowBar 128-block radius limit removed — Added
shouldBeVisibleIgnoreDistancetoPartyManagerso players beyond 128 blocks remain visible on the locator bar, with only same-world and forced-visibility checks applied. - NPC locator bar flash fixed —
PartyManager.updatePlayerVisibilitynow checksviewer.canSee(target)before callingshowPlayer, preventing NPC info packets from being resent every 5 ticks when the NPC is already visible.
Bug Fixes
| Bug | Root Cause | Fix |
|---|---|---|
| Plugin fails to enable without Vault | Vault types in field/method signatures cause NoClassDefFoundError during class loading; new VaultEconomyProvider runs before Vault availability check | Changed Vault-typed fields/methods to Object; guarded VaultEconomyProvider creation; skipped FormatChatListener when vaultChat == null |
| Plugin fails to enable without PacketEvents | Glow class references PacketEvents types in method signatures; new Glow(this) at unconditional line 1524 forces class loading | Guarded Glow/GlowListener creation behind isPacketEventsAvailable(); changed glowCommand field to Object |
| Players beyond 128 blocks hidden on CrowBar | shouldBeVisible applies distance filtering which limits range to 128 blocks | Added shouldBeVisibleIgnoreDistance that skips distance check while keeping same-world and visibility overrides |
| NPCs flash on locator bar every 5 ticks | updatePlayerVisibility calls showPlayer unconditionally every interval | Guarded showPlayer behind viewer.canSee(target) |
Files Changed (8)
| File | Change |
|---|---|
PluginStart.java | Changed Vault fields/methods to Object; guarded VaultEconomyProvider and FormatChatListener creation; guarded Glow/GlowListener behind isPacketEventsAvailable() |
commands/Glow.java | No structural change (guarded at call site) |
DB/PermissionCache.java | getVaultPermission returns Object |
listeners/security/CommandManager.java | vaultPermission field / setupVaultPermission now Object |
listeners/security/MaintenanceManager.java | perms field / constructor param now Object |
managers/core/PartyManager.java | Added shouldBeVisibleIgnoreDistance; canSee guard in updatePlayerVisibility |
packetevents/CrowBarDataSender.java | Uses shouldBeVisibleIgnoreDistance instead of shouldBeVisible |
listeners/security/ConnectionManager.java | vaultChat null guard in reloadChatFormatter |
Technical Details
Vault Class Loading Fix
Paper 1.21+'s PluginClassLoader eagerly resolves type references during class definition. Having Vault types in field declarations or method return types causes NoClassDefFoundError even when the code path never executes. Fix: all Vault-typed fields and return types are now Object, with casts at every call site.
PacketEvents Class Loading Fix
Same mechanism as Vault — PacketEvents types in Glow's method signatures crash class loading. Glow is now only instantiated when isPacketEventsAvailable() returns true, so the class is never loaded on servers without PacketEvents.
Support and Feedback
Issues: https://github.com/castledking/Allium/issues Wiki: https://github.com/castledking/Allium/wiki Discord: https://discord.com/invite/pCKdCX6nYr Website: https://castled.codes/
