Basic Tutorial (API)

This tutorial will help you getting started with using the API.

Checking for LootEx
Before using any methods of the API, check if the plugin is installed and enabled on the server. To make your plugin soft depend on LootEx, simply add this line to your plugin.yml.You can use instead of, which will give your users an error on the console when the server start if LootEx is not enabled, and your   method will not be called. Using the example above will allow you to have custom error messages when LootEx is not enabled.

Making LootEx required
This can be achieved with the following code snippet added to your :

Using the API
The main way of using the plugin's API is through the API class, LootAPI, in which all included methods are static. It will provide you with access to the data the plugin stores, such as all the current loot laying on the ground, the drops of each mob type, and some boolean methods.

For example, to get the list of drops from a Zombie, this line of code can be used:For more information about the interface, go here.