Magic Chest
Nobody enjoys rummaging through inventories to organize the contents. Why not hand that job down to the gremlins? Magic Chest auto-sorts your inventories while you have them closed, so that when you open them they are completely sorted and it's easy to find your stuff.
How It Works
1. Stacks of the same material are combined.
2. Stacks are sorted by item name.
3. Stacks of the same item name are sorted by Data (i.e. Wool Color)
4. Stacks with the same name and Data are sorted by Quantity (So the incomplete stack will be last)
- Note: Chests that are renamed in an anvil or that do not have the default Minecraft inventory title are excluded from sorting.
Before
After
Commands
/mgcs help: shows a command usage help page.
/mgcs on: turns auto-sorting on for the player that ran the command.
/mgcs off: turns auto-sorting off for the player that ran the command.
/mgcs invon: turns auto-sorting on for the players inventory when an item is picked up. (v1.2.4 and above)
/mgcs invoff: turns auto-sorting off for the players inventory. (v1.2.4 and above)
/mgcs reload: reloads all of MagicChest's config.
Permissions
magicchest.sort: Sorts all inventories that this player opens.
magicchest.sort.chest: Sorts chests that this player opens.
magicchest.sort.dispenser: Sorts dispensers that this player opens.
magicchest.sort.enderchest: Sorts ender chests that this player opens.
magicchest.sort.shulkerbox: Sorts a shulker box that this player opens.
magicchest.help: Shows a usage help.
magicchest.reload: Reloads all of MagicChest's config.
Reviews
cobwebster's (aka. ShinyTinselWorm) overview of MagicChest
Plugin Stats
Plugin Compatibility
dtlTraders- Avoids sorting TNPC inventories.
ChestCommands- Ignores sorting ChestCommands inventories.
FastCraft- Avoids sorting FastCraft menu.
AShops- Avoids sorting AShops inventories.
SkillAPI- Avoids sorting SkillTrees and other menus.
- If you have a problem with MagicChest sorting another plugins inventory or something like that please do not hesitate to leave a comment and let me know.
InventorySortEvent API (for plugin devs)
If you need to cancel MagicChest sorting an inventory, this is for you. Github Wiki
Massive shoutout & thanks to:
dandielo - making dtlTraders compatibility possible! Couldn't have helped folks without you!
timsavage - dtlTraders plugin compatibility request!
filoghost - author of the awesome ChestCommands plugin and the help and support of MagicChest! Couldn't have done it without your suggestion! :)
lecraeman - for requesting support of ChestCommands!
Kepler_ - author of FastCraft and supporter of MagicChest. Thanks for letting me know and working with me!
Metrics Information
Quote:This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
A unique identifier The server's version of Java Whether the server is in offline or online mode The plugin's version The server's version The OS version/name and architecture The core count for the CPU The number of players online The Metrics version Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
I encountered a serious issue with this plugin and I had to delete it. Reinstalling did not fix it. Whenever I opened my inventory on as horse, the armor and the saddle would somehow switch places in the inventory. The armor would be on the saddle slot, and the saddle would be on the armor slot. This makes both the armor and saddle invisible on the horse, and the horse becomes impossible to ride until you move them back. I loved Magic Chest, please fix this issue so I can put it back on my server.
This plugin sorts the config inventory from armorstandtools would be nice if you could update to fix that
@tecno_wizard
I will work on a fix for this this week. I gotta check and see if the API for Spigot is caught up with the new dual weilding stuff.
This is broken in 1.9. Whenever an item is picked up and an item is in the second hand, that second hand item is duplicated.
@Kixot14
If I worked on the sorting more, I'd have to figure out a way to optimize it. I may consider using a scheduler to sort the inventory. I'll look into it more. Thanks.
@uvbeenzaned
All posted in timings. Spigot v1.8.3. Normal stable version. All works good with it!
Just try to drop many(100+) items on the ground and pickup all of it in one time. And then look at your ping\tps...
@Kixot14
If you would be willing to translate the strings, I'll make some time somewhere and put them in a config file. I just need you to send me them in a way that I know what English strings match with the other languages strings. Code is here.
Seeing that MagicChest is going to constantly be sorting the whole inventory, timing like this just makes sense. Players are constantly picking up items and opening chests. There is no way to avoid timing like this. MagicChest spends a lot of the game time doing inventory sorting because it uses the java collection sorting method which is an algorithm deep down. Unless an optimized rewrite is done on the plugin, there will be no immediate fix for that. Also, I've never noticed any lag or intense server load cause by MagicChest. What hardware are you running your server on?
Cool plugin, but have many bugs, dont have localization, and very very huge CPU load with him...
http://s020.radikal.ru/i709/1508/e4/c81a10b9f37e.png
@blablubbabc
MagicChest only sorts on InventoryOpenEvent is the first problem. The second problem is that my plugin would then be spamming every item in the visible inventory menu to see if the inventory click event was cancelled. That could potentially be intense.
Currently, there are 2 ways that all of this can be overcome. Either I implement another persons plugin or they could simply use my API to cancel my plugin out. The latter option is a much better route but it seems as though not many developers want to pick up on that and use it.
Maybe this plugin could be made compatible with all kinds of custom plugin-created inventories by triggering fake InventoryClickEvents for the viewing player. So MagicChest only moves the items around if the viewing player would be allowed to do that himself (if the corresponding InventoryClickEvents are not cancelled).
MagicChest plugin have bug when trying to sort Donkey inventory. And player inventory sort permission work only for op or for player with magicchest.* permission
Hey guys! I really like this plugin. It is just lagging my server as hell. Check out this timing log: http://timings.aikar.co/?url=11260733\ Could you guys fix this? I would love to be able to keep using this as my players love it!
@neon52
New version fixing ChestCommands compat will be available for download soon!
@TheD4n
That's a good idea! I will consider putting that in there soon.
You should add a config option to not sort chests with custom titles and that way it will be compatible with custom plugins with either a wildcard whitelist or blacklist.
Also can you check comparability with chest commands? I am having the menu sorted.
Thanks!
@uvbeenzaned
thank you. Check compatibility tested on the latest versions, and on the penultimate.
@neon52
I may need to check with filoghost about his plugin to make sure compatibility still works. Let me get back with you on that.
The plugin is great, but there is an error. He also sorts GUI Plugin ChestCommands - need to ignore the sort to only open chests
@DerekZil
I'm sorry but you must have not seen the bugs list below that release. Spigot has caused many of my plugins to have annoying bugs. Gonna figure it out though.
"Known caveats
Player inventory sorting is broken."
Don't worry, I am working on it!
@roracle
Sure thing boss. :) Thanks for reporting those! I need to get up with each of the authors to approve with them and I will start work on this.
P.S. Sorry, didn't see the bottom. By default, everyone has permissions to sort with the plugin. You only need to remove from specific groups or people to disallow it.