Skip to main content

Developer API

If you are a developer and want to create an addon or extension, you can use the API provided by HMCWraps. The most useful source of information are the JavaDocs, but you can just ask the developer in our Discord server.

Build Tool

Gradle Kotlin

repositories {

dependencies {

Gradle Groovy

repositories {
maven {
url ""

dependencies {
compileOnly "de.skyslycer.hmcwraps:api:1.0.0"





Getting the plugin instance

if (Bukkit.getPluginManager().isPluginEnabled("HMCWraps")) {
var wraps = (HMCWraps) Bukkit.getPluginManager().getPlugin(HMCWraps.class);

Wrapping Items

var wrap = wraps.getWraps().get("some_wrap_uuid");
var newItem = wraps.getWrapper().setWrap(wrap, item, false, player, true);

This wraps the item with the wrap with the uuid some_wrap_uuid virtually and gives the physical wrapper back if there was one applied.

Note: The method returns an ItemStack. The plugin does not automatically apply the wrap to the item, you have to replace the item with the returned item yourself.

Unwrapping Items

var newItem = wraps.getWrapper().removeWrap(item, player, true);

This unwraps the item and gives the physical wrapper back if there was one applied.

Note: Just like wrapping, you have to replace the item by the returned item yourself.

Getting the Wrap of an Item

var wrap = wraps.getWrapper().getWrap(item);

This gets the current wrap or null if the item isn't wrapped.


There are multiple events you can listen to, change values and cancel to your liking:



public class ItemWrapListener implements Listener {

public void onItemWrap(ItemWrapEvent event) {


public class SomePlugin extends JavaPlugin {

public void onEnable() {
Bukkit.getPluginManager().registerEvents(new ItemWrapListener());