As requested by a few of the users, the API now supports heads from
minecraft-heads.com
IMPORTANT: Searching through this database is very slow! While it doesn't impact the performance of the server itself, it can take between 1 and 3 seconds
per head to load. This means that trying to load 50 heads can take over 2.5 minutes! This is a limitation on the side of the database, not on the side of the plugin, so I have no control over this. While the search is in progress, you can still do everything in minecraft and it shouldn't cause any disconnects.
Server owners:
You can add a custom categories that use minecraft-heads.com in the following way to categories.yml:
Code (Text):
customcategories:
doge:
id: 14
loader: minecraftheads
urls:
- doge
Plugin writers:
Everything works just like before. The only thing that really changed is the addition of the
MinecraftHeadsLoader class, which is the
DatabaseLoader implementation for minecraft-heads.com.
Because of how slow the heads load, I added a
CommandSender parameter to the constructor of
MinecraftHeadsLoader. If
null, the class behaves just like the other
DatabaseLoader implementations, but if a sender is provided, then the progress of loading the search results are shown to that sender (in increments of 5).
Example: when using HeadsInventory, doing the
/headsinv mhsearch dog command will show the following messages to the person that did the command:
Code (Text):
[HeadsPluginAPI] Loading 41 heads. Please wait...
[HeadsPluginAPI] 0/41
[HeadsPluginAPI] 5/41
[HeadsPluginAPI] 10/41
[HeadsPluginAPI] 15/41
[HeadsPluginAPI] 20/41
[HeadsPluginAPI] 25/41
[HeadsPluginAPI] 30/41
[HeadsPluginAPI] 35/41
[HeadsPluginAPI] 40/41
[HeadsInventory] Choose a head from the inventory...