remove getPlugin and add containsChild
@@ -349,13 +349,6 @@ default Inventory query(PropertyMatcher<?> propertyMatcher) {
*/
<T extends Inventory> Optional<T> query(Class<T> inventoryType);
- /**
- * Returns the {@link PluginContainer} who built this inventory.
- *
- * @return The container
- */
- PluginContainer getPlugin();
-
/**
* Intersects the slots of both inventories.
* The resulting inventory will only contain slots
@@ -415,6 +408,15 @@ default Inventory transform(InventoryTransformation transformation) {
return transformation.transform(this);
}
+ /**
+ * Returns true if the given inventory is a direct child of this one.
+ *
+ * @param child the child inventory to check for.
+ *
+ * @return whether the given inventory is a direct child of this one.
+ */
+ boolean containsChild(Inventory child);
+
/**
* Returns this inventory as a viewable inventory if possible.
*
