ChestSort

ChestSort will automatically sort every chest after you have used it. Every player can enable or disable this feature if desired with the simple command /chestsort. Players can also sort their own inventory using the command /invsort. You can also use hotkeys (middle-click, double-click, shift-click and shift+right-click) within inventories to have them sorted, if you do not wish automatic sorting.

The chest contents are sorted by category and/or alphabetically and stackable things will be stacked. By default, items will be put before blocks. Automatic sorting will work with chests, enderchests, shulker boxes and barrels. Sorting by hotkeys works with the player inventory, too. Wool, Terracotta and other dyeable blocks will also be sorted by color. The sorting algorithm can be changed. '''There is absolutely no chance of item loss / duplication or metadata corruption! Guaranteed!'''

 Commands 

/chestsort or /sort Toggle automatic chest sorting.

/chestsort hotkeys Open the hotkeys GUI to enable/disable hotkeys per player.

/invsort or /isort Sort the player's inventory.

/invsort hotbar or /isort hotbar Sort the player's hotbar.

/invsort all or /isort all Sort the player's inventory and hotbar.

 Hotkeys 

You can use hotkeys to sort inventories without having to enter commands. This is useful if you only want to sort chests from time to time without having to enable the automatic sorting, or if you quickly want to sort your player inventory. Each hotkey can be enabled/disabled in the config.yml. By default, all hotkeys are enabled. Additionally, players can enable/disable each hotkey individually by running /chestsort hotkeys

Middle click Middle click (mousewheel) on ANY inventory slot

Shift click Shift + left click on any EMPTY inventory slot

Double click Double click on any EMPTY inventory slot

Shift + right click Shift + right click on any EMPTY inventory slot