Extend API

This commit is contained in:
GeorgH93 2021-06-30 18:33:04 +02:00
parent 6adbc12631
commit d7b0f34695
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -125,6 +125,28 @@ public interface Backpack extends InventoryHolder
return getInventory().addItem(itemStacks);
}
/**
* Checks if this backpack is a multi page backpack page.
*
* @return true if this backpack is a multi page backpack page.
*/
default boolean isBackpackPage()
{
return false;
}
/**
* Gets the {@link BackpackMultiPage} that owns this backpack page.
*
* @return null if not owned by a multi page backpack.
*/
@Nullable BackpackMultiPage getMultiPageOwner();
default boolean isMultiPageBackpack()
{
return false;
}
@SuppressWarnings("unused")
static boolean isBackpack(@Nullable Inventory inventory)
{