Updated for Minecraft Paper Servers 26.1.2
InventorySortListener.java Sound.UI_BUTTON_CLICK → Sound.UI_LOOM_SELECT_PATTERN (UI_BUTTON_CLICK was removed in 1.21.x)
isPlayerInventoryView() rewritten Old: fragile string hacks (.name().contains("CRAFTING")) New: clean InventoryType enum comparison
instanceof Player guard added to onInventoryClick (event.getWhoClicked() can theoretically be non-Player) buildItemComparator() — added null-check on meta.displayName() (displayName() can return null in 1.21.4 if not explicitly set) PlainTextComponentSerializer import made explicit (top-level import)
SortCooldownManager.java BukkitTask field added to hold cleanupTask reference cleanup() now cancels the task cleanly before clearing maps startCleanupTask() stores return value in cleanupTask field
plugin.yml version bumped to 1.2.0 to reflect the update

A lightweight Paper plugin that sorts and stacks your inventory with a simple double right-click. Hotbar safe!