Skip to content

1.21.11 update: drop legacy deps, fix ender chest sorting#213

Open
SamsSide wants to merge 1 commit intomfnalex:masterfrom
SamsSide:main
Open

1.21.11 update: drop legacy deps, fix ender chest sorting#213
SamsSide wants to merge 1 commit intomfnalex:masterfrom
SamsSide:main

Conversation

@SamsSide
Copy link
Copy Markdown

@SamsSide SamsSide commented Apr 8, 2026

Summary

  • 1.21.11 / Java 21 compatibility - targets Paper API 1.21.11, compiles under Java 21, api-version in plugin.yml updated to 1.21
  • Removed heavy third-party dependencies - jefflib, SpigotUpdateChecker, MorePersistentDataTypes, PaperLib, InvUnload, and the jeff-media Maven repos are gone
  • Fixed ender chest sorting - sorting was broken because the viewed Inventory object is a copy, not the players backing ender chest; all sort paths now call p.getEnderChest() directly and use InventoryType.ENDER_CHEST for type checks
  • Native PDC for player settings - NBTAPI replaced with Bukkits built-in PersistentDataContainer API everywhere
  • Self-contained GUI item builder - ItemStackUtils.fromConfigurationSection (jefflib) replaced with an inline implementation in NewUI
  • Utils.formatText - replaces TextUtils.format (jefflib); handles color codes and hex tags
  • PersistentDataType.LIST.strings() - replaces MorePersistentDataTypes list type
  • Protection plugin check - ProtectionUtils.canBreak (jefflib) replaced with a native BlockBreakEvent cancellation check
  • Minepacks hook via reflection - avoids a hard compile-time dependency on the Minepacks API jar
  • Potion sorting - uses the new 1.20.5+ getBasePotionType() API with a fallback to getBasePotionData()

Test plan

  • Build with mvn package on Java 21 against Paper 1.21.11
  • Open a normal chest - auto-sort and hotkey sort both work
  • Open an ender chest - contents sort correctly on open and via hotkey
  • Toggle sorting on/off - settings persist across relog
  • Confirm no ClassNotFoundException on servers without Minepacks installed
  • Confirm GUI opens and buttons function correctly

- Bump version to 14.3.0, target Paper API 1.21.4, Java 21
- Replace jefflib NBTAPI with native PersistentDataContainer API for all
  player settings storage
- Replace jefflib TextUtils/ItemStackUtils with self-contained Utils.formatText
  and an inline ItemStack builder supporting hex colours and skull textures
- Replace MorePersistentDataTypes DataType.asList with PersistentDataType.LIST.strings()
- Remove SpigotUpdateChecker, JeffLib.init, PaperLib, InvUnload dependency
- Replace jefflib ProtectionUtils with a native BlockBreakEvent cancellation check
- Fix ender chest sorting: always sort via p.getEnderChest() so the backing
  inventory is mutated correctly; use InventoryType.ENDER_CHEST checks
  instead of fragile inventory reference equality
- Update Minepacks hook to use reflection to avoid hard compile dependency
- Update potion sorting to use new 1.20.5+ getBasePotionType() API with
  fallback to the old getBasePotionData() API
- Update plugin.yml api-version to 1.21, add SamsSide as author

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SamsSide SamsSide changed the title 1.21.4 update: drop legacy deps, fix ender chest sorting 1.21.11 update: drop legacy deps, fix ender chest sorting Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant