Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arcaniax-development/headdatabase-api
API for the famous HeadDatabase plugin
https://github.com/arcaniax-development/headdatabase-api
hdb headdatabase headdb heads minecraft plugin spigot
Last synced: 3 days ago
JSON representation
API for the famous HeadDatabase plugin
- Host: GitHub
- URL: https://github.com/arcaniax-development/headdatabase-api
- Owner: Arcaniax-Development
- License: gpl-3.0
- Created: 2020-09-11T13:18:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-01T03:42:51.000Z (28 days ago)
- Last Synced: 2024-12-26T15:10:03.262Z (3 days ago)
- Topics: hdb, headdatabase, headdb, heads, minecraft, plugin, spigot
- Language: Java
- Homepage: https://www.spigotmc.org/resources/14280/
- Size: 466 KB
- Stars: 36
- Watchers: 2
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
---
Head Database is a fast and user-friendly plugin that allows you to obtain thousands of custom Minecraft skulls that feature unique designs.
This easy-to-use heads plugin gives you access to creative designing opportunities that overall enhances the quality of your builds, and gives creative freedom to yourself and your players.This is the API repository for HeadDatabase. This is **not** HeadDatabase.
If you are looking for the plugin HeadDatabase, get it [from spigot](https://www.spigotmc.org/resources/14280/).## Links
* [Discord](https://discord.gg/jpRVrjd)
* [Issues](https://github.com/Arcaniax-Development/HeadDatabase-API/issues)
* [JavaDocs](https://javadoc.io/doc/com.arcaniax/HeadDatabase-API)## How to use the API
Releases are published to the central repository, snapshots are published to S01 OSS Sonatype.### Gradle
```kotlin
repositories {
mavenCentral()
}dependencies {
compileOnly("com.arcaniax:HeadDatabase-API:1.3.2")
}
```### Maven
```xmlcom.arcaniax
HeadDatabase-API
1.3.2
provided```
# Building
Gradle is the recommended way to build the project. Use `./gradlew build` in the main project directory to build the project.## Suggestions
Suggestions are welcome! We have a separate issue form for suggestions, that can be found [here](https://github.com/Brennian/HeadDatabase-API/issues).## Example usage
```java
import me.arcaniax.hdb.api.DatabaseLoadEvent;
import me.arcaniax.hdb.api.HeadDatabaseAPI;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;public class HeadDatabaseAPIPlugin extends JavaPlugin implements Listener {
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
}@EventHandler
public void onDatabaseLoad(DatabaseLoadEvent e) {
HeadDatabaseAPI api = new HeadDatabaseAPI();
try {
ItemStack item = api.getItemHead("7129");
getLogger().info(api.getItemID(item));
} catch (NullPointerException nullPointerException) {
getLogger().info("Could not find the head you were looking for");
}
}
}
```
### Tips:- Don't forget to add `HeadDatabase` to `depend` or `softdepend` section of your `plugin.yml`
- Listen to `DatabaseLoadEvent` and register your events afterwards. The event is fired once HeadDatabase is loaded successfully.