Files
spigot-inventory-helper/README.md
T
dmg 3960672104
Release / release (push) Successful in 2m54s
CI / build (push) Failing after 18m56s
feat(tools): replace broken main-hand tools
2026-09-04 12:00:56 -04:00

1.9 KiB
Raw Blame History

Spigot Inventory Helper

A Purpur 26.2 plugin that sorts inventories with a craftable Sorting Stick and automatically replaces broken tools with equivalent tools from the player's inventory.

The approved behavior is specified in the OKF design bundle.

Requirements

  • Purpur 26.2 build 2618
  • Java 25 or newer

Build

./gradlew clean check jar

The plugin JAR is written to build/libs/.

Sorting Stick recipe

Place these ingredients vertically in the crafting grid's center column:

Chest or Barrel
Redstone Dust
Stick

Either storage-block variant produces one Sorting Stick.

Sorting inventories

Hold an authentic Sorting Stick and right-click:

  • A chest or either half of a double chest to sort its complete inventory.
  • A barrel to sort its inventory.
  • Air or another block to sort player inventory slots 935.

Player hotbar, armor, and off-hand slots remain unchanged during player sorting. Compatible stacks are consolidated first, then items are ordered alphabetically by Minecraft material. Dissimilar metadata variants of the same material retain their relative order. Locked containers and interactions cancelled by protection plugins are not sorted.

Automatic tool replacement

When a main-hand tool breaks, an item with the exact same material is moved into the broken tool's selected hotbar slot on the next server tick. Main-storage candidates are preferred before tools in other hotbar slots. The complete replacement item is moved unchanged, preserving durability, enchantments, custom names, and other metadata. Off-hand breaks are ignored, and no unrelated item is moved when a match is unavailable.

Releases

Gitea Actions checks pushes and pull requests and stores a development JAR. Pull requests validate conventional commits. Main-branch conventional commits drive semantic releases when the repository defines a RELEASE_TOKEN with contents-write permission.