/zHead

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

zHead Database

We would like to extend our heartfelt thanks to Minecraft-Heads.com for providing their API, which has been an invaluable source of all the data used in our project.

API

Jitpack: https://jitpack.io/#Maxlego08/zHead

Maven

<repositories>
  <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependency>
    <groupId>com.github.Maxlego08</groupId>
    <artifactId>zHead</artifactId>
    <version>1.1</version>
    <scope>provided</scope>
</dependency>
public void example(){
    HeadManager headManager = getProvider(HeadManager.class);
    ItemStack itemStack = headManager.createItemStack(<head id>); # Create an itemstack using an head ID, if the id doesn't exist the itemstack will be null
    List<Head> heads = headManager.search(<value>); # Search for a list of heads based on its name, id, or tag
    Optional<Head> optional = headManager.getHead(<head id>); 
}

public <T> T getProvider(Class<T> classz) {
    RegisteredServiceProvider<T> provider = getServer().getServicesManager().getRegistration(classz);
    return provider == null ? null : provider.getProvider();
}