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.
update coming?
@AT_HE
OK, create a ticket please and include the exact steps to reproduce the problem. Please also include your server startup log. It's working fine for me here after I made the changes in the dev build I linked for you, so I need to know what you're doing to trigger the problem.
@desht
same thing
@AT_HE
Yeah, you're right, it is a bit screwy right now.
Can you try this dev build: http://ci.hawkfalcon.com/job/ClickSort/3/ and let me know how it works out for you?
@desht
in config.yml.. when i change "defaults: shift_click: true" to false and reload plugin, it turns true again
@AT_HE
What exactly have you changed in your config.yml (I assume you meant .yml, not .xml) ? The definitions under "defaults:" in
config.yml
are defaults for new users who haven't set any preferences yet - they won't affect users who already have personal preferences defined insorting.yml
. You can either edit that and reload your server, or type (at the client, not the console):The
/clicksort shiftclick
command toggles between enabling and disabling shift-clicking; just ensure you see the "DISABLED" message.i want to force middle button and sort by id (disable shift click and ordering cycle)
but when i edit this in config.xml i am still getting messages about order cycle when i shift click inventory to manage stacks
@Honest_Routuan
1. Kindly don't post big stack traces in the comments page. Use tickets for reporting such problems. Any future stack traces posted in the wrong place will be deleted without further comment.
2. This version of ClickSort requires CB 1.6.x. It won't work on 1.5.
07:42:41 [SEVERE] Could not pass event InventoryClickEvent to ClickSort v1.2.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:463) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:1189) at net.minecraft.server.v1_5_R3.Packet102WindowClick.handle(SourceFile:31) at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:218) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:109) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at org.spigotmc.MultiplexingServerConnection.b(MultiplexingServerConnection.java:72) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:583) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.NoSuchMethodError: org.bukkit.event.inventory.InventoryClickEvent.getClick()Lorg/bukkit/event/inventory/ClickType; at me.desht.clicksort.ClickSortPlugin.onInventoryClicked(ClickSortPlugin.java:151) at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 15 more
07:30:56 [SEVERE] Could not pass event InventoryClickEvent to ClickSort v1.2.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:463) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:1189) at net.minecraft.server.v1_5_R3.Packet102WindowClick.handle(SourceFile:31) at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:218) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:109) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at org.spigotmc.MultiplexingServerConnection.b(MultiplexingServerConnection.java:72) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:583) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.NoSuchMethodError: org.bukkit.event.inventory.InventoryClickEvent.getClick()Lorg/bukkit/event/inventory/ClickType; at me.desht.clicksort.ClickSortPlugin.onInventoryClicked(ClickSortPlugin.java:151) at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
@ProsperCraft
Please use http://dev.bukkit.org/bukkit-plugins/clicksort/tickets/8-click-sort-npe-in-sort-key-compare-to/ for correspondence on this problem.
[ClickSort] Task #564 for ClickSort v1.2.0 generated an exception java.lang.NullPointerException
See the full console errors at http://paste.md-5.net/godocajoni.avrasm
@diannetea
What other plugins are you running? If you're running any of my other plugins, and you have the log_level set to something else (looks like FINEST) for one of those, the log level can bleed over. There's not much I can do about this - it's down to the way Bukkit does plugin loggers. See https://bukkit.atlassian.net/browse/BUKKIT-1715. You might find simply doing
/clicksort reload
shuts it up.If you're not running any of my other plugins, I'll need to see the contents of your ClickSort folder in full.
with
log_level: INFO
I still get
@fungreenfox
Sorry to hear that. Steps to take:
installed 1.2.1 at 1.6.2 craftbukkit. All players have lost their items!
@desht
No problem, thanks for the quick update!
@Swords761
Doh! I'll get new a build up ASAP with that removed. Sorry about that.
Update: Jenkins build http://jenkins.genesis-mc.com/job/Clicksort/lastBuild/me.desht$clicksort/artifact/me.desht/clicksort/1.2.0/clicksort-1.2.0.jar is identical to the (as yet unapproved) uploaded 1.2.0, except without that spurious debug message. Should work for you in the short term.
Gonna pull the 1.2.0 upload and do a 1.2.1 release instead.
Hey there,
I downloaded your newest build of Clicksort (v1.2.0) and put it on Spigot 1.5.2 R1.0. It looks like you left a piece of debug code in there, as every time someone uses the creative inventory (ie. takes out a block or puts on in there to trash it), the following message comes up:
[INFO] click: CREATIVE
Might want to remove this ;) thanks!
@untergrundbiber
Yes, a new version is in the works and should be released quite soon. The current version actually works fine on 1.6, but the new version will also allow sorting with the middle mouse button (which is nice if you're used to the InventoryTweaks mod).