作者:rebot | 分类:模组
Minecraft 版本: 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11
平台: paper purpur spigot
标签: game-mechanics storage utility
The ChestSort plugin enhances your Minecraft experience by allowing players to easily sort the contents of their chests with a simple double-click on an empty slot. This functionality streamlines inventory management and ensures that your items are organized efficiently.
How It Works:
Double-Click Detection:
The plugin maintains a record of the last click time for each player.
When a player clicks an empty slot in a chest, it compares the current click time with the last recorded click time.
If the two clicks occur within 500 milliseconds (indicating a double-click), the chest's inventory is sorted.
Inventory Sorting:
The sortInventory method collects all non-null items from the chest.
The items are sorted by their type using a comparator.
The chest is cleared, and the sorted items are placed back into the inventory.
User Feedback:
When the chest is sorted successfully, the player receives a chat message confirming the action ("Chest sorted!").
This plugin simplifies the process of organizing your chests, saving you time and effort in managing your inventory. Enjoy a clutter-free Minecraft experience with ChestSort!
请登录后举报
暂无评论,抢个沙发吧~