Item Provider
On this page you will learn how to add an item provider into DungeonMMO. The goal of this process is to let players use custom items from your plugin into DungeonMMO either for chest loots or mob drops.
Step 1 - Add DungeonMMO as soft dependency
Into your plugin.yml file, add this line to load your plugin after DungeonMMO
Step 2 - Register your item provider
Now you want to register the item provider. Your provider will be called every time a DungeonCustomItem with the provider name corresponding to the first parameter of the method registerItemProvider will need to spawn. If the itemTag is invalid, the method generateItem must return null.
Step 3 - Test your provider
Into the chests.yml or mob_drops.yml, add a DungeonCustomItem with the item provider corresponding to the one you created earlier. The item_tag value must be a valid value for your provider.
Now save your file, launch the server and join a dungeon instance. You should be able to find your items into the chests !
Last updated