I am making a plugin for Bukkit and am creating an advanced sorting mechanic for players to use. I have it all set up except for one thing: Enchanted books. I have no issues writing any code (which is why I put this in this channel instead of the development one), however I have no idea what criteria to use for sorting them. So far I've come up with a few ideas: Sort by name of highest-level enchantment Sort by total level of enchantment Sort by applicable tool (However my plugin also allows enchantments on items that normally can't get it, so an enchanted book would be able to hold both Sharpness and Protection) Sort by 'power' rating (This is currently the method that I'll stick with, although I find this is too subjective and may be difficult to locate items through this method) Sort by number of enchantments Sort by name of first enchantment None of these ideas seem like they're very good so if anybody has any ideas on how I can sort these enchanted books, any help or ideas would be appreciated. Edit: I'm not sorting the enchantments on the book, rather I'm sorting the book with other ones.