Adding support with API

Guide on how to add support to our heads using the API

Adding support is very easy! It's as simple as allowing players to input their desired custom head id and loading the head item from our API.

1. Add AdvancedHeads as a soft dependency into your plugins.yml file

plugin.yml
softdepend: [AdvancedHeads]

2. Example integration into a config file:

config.yml
item:
  advancedHeads: 222

3. Now, onto the loading part from code:

Main.java
ItemStack customHead = AdvancedHeadsAPI.getHead(getConfig().getInt("item.advancedHeads));

4. The result

Now you have an itemstack, which looks like this in-game:

Last updated