ClickSort
ClickSort
ClickSort is a Bukkit plugin which makes it very easy for players to sort their inventories (player/chest/dispenser) with a single or double click of the mouse. Players can sort by item ID, item name, switch between single- and double-clicking, or disable sorting entirely, all on a per-player basis and without needing any commands; it's all done with mouse clicks in inventory windows.
Latest Version
- ClickSort v1.6.1 for CraftBukkit 1.16.x~1.19.x
- ClickSort v1.5.0 for CraftBukkit 1.13.x~1.15.x
- ClickSort v1.3.4 for CraftBukkit 1.10.x~1.12.x
- ClickSort v1.3.2 for CraftBukkit 1.9.x
- ClickSort v1.3.1 for CraftBukkit 1.8.x
- ClickSort v1.3.0 for CraftBukkit 1.6.x/1.7.x
- ClickSort v1.1.2 for CraftBukkit 1.4.6+
All versions above should work on Spigot.
Video
A review of v1.0.0, with thanks to VariationVault :
Installation
- Copy ClickSort.jar into your
bukkit/plugins
folder and reload/restart your CraftBukkit server. - The
bukkit/plugins/ClickSort
folder will be automatically created, containing aconfig.yml
file. - You may edit this file as you please, and run
/clicksort reload
to reload. See Configuration for details.
As of v1.3.2, you'll have to put your item names into items.yml manually if you want to sort by item names.
Usage
ClickSort operates as follows:
- In middle-click mode (the default, or swap key 'F' since ClickSort v1.5.1) players can sort their own inventory, a chest/dispenser/hopper/dropper inventory by middle-clicking any slot in that inventory (including slots with items in).
- In double-click mode, players can sort by double-left-clicking any slot in that inventory (including slots with items in).
- In single-click mode, players can sort inventories by single-left-clicking any empty slot in that inventory.
- By default, items are sorted by item ID (see http://www.minecraftwiki.net/wiki/Data_Value for a full list of ID's) and the click mode is middle-click (in v1.1 and earlier, the default click mode was double-click).
- Players can Shift-left-click any empty inventory slot to cycle through sorting by item ID, item name, item group, or item value (see Sort Modes for more detail on each sort mode).
- Players can Shift-right-click any empty inventory slot to cycle between double-click and single-click mode, or disabled sorting.
Any mode changes will give the player a feedback message indicating the new sort or click mode. Player sort/click modes are persistent across server restarts.
As of v1.1.0, it is also possible for players to disable shift-click mode changing (on a per-player basis); some players may find themselves annoyed by accidentally shift-clicking empty inventory slots. To avoid this, players can use the /clicksort shiftclick
command to toggle shift-clicking for themselves.
Also as of v1.1.0, two commands have been added to allow players to set their sort or click modes directly; these are most useful if shift-click mode changing has been disabled:
/clicksort sort <id|name|group|value>
/clicksort click <middle|double|single|swap|none>
Protection
ClickSort attempts to respect protection plugins which cancel InventoryClickEvent by running its own event handler as late as possible and ignoring cancelled events.
Documentation
Planned
- Possible sort mode to compact items? E.g. 9 iron ingot -> iron block, 9 diamond -> diamond block etc. Might require the player to have a crafting table in their inventory, or be standing near one.
- Maybe a sorting "wand" to have the option of sorting chests without having the inventory open? A stick with some appropriate metadata set on it, for example.
Source
Changelog
Usage Statistics
Fully anonymous usage statistics are collected using bStats.
Do you plan an update for 1.6?
I'm really slow, obviously.
It's still happening but because it doesn't affect survival I haven't really worried about it. This may be a conflict with GameModeInventories, but I haven't done much testing.
@diannetea
Sorry for the delay in reply - been out of town recently. I'll take a look at this ASAP and see if I can reproduce it.
Update: I can't. Clicksort doesn't even attempt to sort your survival mode inventory while in creative mode. What are you doing to see this problem?
I've noticed that in creative mode, items in my inventory will be deleted if clicked too many times. It has happened a couple of times on accident, which isn't a big deal, but it's just annoying enough that I'd like it looked into. It's easily reproducible on my server, but I have not checked for a plugin conflict.
@harl
Yeah, I'll have a look at StackableItems and see how easy it will be to support it. Good idea.
Cool mod! Since you're already checking for the amount of items that are sorted, their types, their stackability and if there'd be more item slots needed after they got sorted than they needed before - Would you be able to add support for StackableItems? Or maybe add an option to not unstack anything that's already stacked?
Alright, couple new errors with the latest build :( I think it may be a plugin conflict. Posted a ticket.
@diannetea
Yeah, I've already seen and responded to your ticket for this issue - could you follow up on that please?
A little error, using Spigot build 532:
2013-02-16 23:12:49 [WARNING] [ClickSort] Task #1829963 for ClickSort v1.0.1 generated an exception java.lang.NumberFormatException: For input string: "00)" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at me.desht.clicksort.ClickSortPlugin.sortAndMerge(ClickSortPlugin.java:346) at me.desht.clicksort.ClickSortPlugin.sortInventory(ClickSortPlugin.java:274) at me.desht.clicksort.ClickSortPlugin.access$000(ClickSortPlugin.java:51) at me.desht.clicksort.ClickSortPlugin$1.run(ClickSortPlugin.java:163) at org.bukkit.craftbukkit.v1_4_R1.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_4_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344) at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:521) at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:485) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:420) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
@Zoofule
Yeah, I could make that a config option for sure.
I was wondering if you could make a config options that allows for me to disable shift clicking as a way to change my settings, (I constantly accidentally shift click empty inventory slots when trying to move stuff from my inventory to a chest) or maybe change it to commands instead?
@desht Well thank you for taking a look at it and liking it.
I always have good ideas, my posts just dont get a lot of attention :/ Maybe because Im too detailed?
Well if you ever run out of ideas for plugins I have tons more I can give links to.
@IdealIdeas
Interesting! I'll have a think about how some of those ideas could be incorporated into ClickSort.
If you wouldnt mind, I would like to direct you to a plugin request I made sometime ago about a chest sorting plugin.
http://forums.bukkit.org/threads/almighty-chest-sorting-plugin-more.106987/#post-1387250