This wrapper makes it possible to make use of the ItemsAdder CustomStack without adding the API to your build dependencies.
The wrapper can be access via the ItemsAdderIntegration.
getByItemStack and getInstance return a new CustomStack wrapper.
Get the integration:
ItemsAdderIntegration integration = wuCore.getCompatibilityManager().getPlugins().getIntegration("ItemsAdder", ItemsAdderIntegration.class);
if (integration != null) {
//ItemsAdder is available
}
or
wuCore.getCompatibilityManager().getPlugins().runIfAvailable("ItemsAdder", ItemsAdderIntegration.class, integration -> {
//ItemsAdder is available
//use the integration e.g. integration.getByItemStack(itemstack);
//of course you need to use Atomics to edit variables outside of this lambda.
});
This wrapper makes it possible to make use of the ItemsAdder CustomStack without adding the API to your build dependencies.
The wrapper can be access via the
ItemsAdderIntegration
.getByItemStack
andgetInstance
return a new CustomStack wrapper.Get the integration:
or