AdvancedHeads
HomepageDownload for freeJoin Discord
  • AdvancedHeads
  • ✳️Information
    • 🎭50,000+ Heads
    • Supported Plugins
    • How to use in plugins
  • ⚙️Usage
    • Find Custom Head ID
    • Adding support with API
    • Commands and Permissions
  • 🌐Find this plugin on
    • ➡️AdvancedPlugins.net
    • ➡️SpigotMC.org
Powered by GitBook
On this page
  • 1. Add AdvancedHeads as a soft dependency into your plugins.yml file
  • 2. Example integration into a config file:
  • 3. Now, onto the loading part from code:
  • 4. The result

Was this helpful?

  1. Usage

Adding support with API

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

PreviousFind Custom Head IDNextCommands and Permissions

Last updated 3 years ago

Was this helpful?

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:

⚙️