diff --git a/api/src/main/java/de/epiceric/shopchest/api/shop/Shop.java b/api/src/main/java/de/epiceric/shopchest/api/shop/Shop.java index 1eba9e4..19d6abc 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/shop/Shop.java +++ b/api/src/main/java/de/epiceric/shopchest/api/shop/Shop.java @@ -6,6 +6,7 @@ import org.bukkit.World; import org.bukkit.inventory.Inventory; import de.epiceric.shopchest.api.ShopManager; +import de.epiceric.shopchest.api.exceptions.ChestNotFoundException; /** * Represents a shop @@ -33,7 +34,7 @@ public interface Shop { OfflinePlayer getVendor(); /** - * Gets the product this shop is buying or selling + * Gets a copy of the product this shop is buying or selling * * @return the product * @since 1.13 @@ -72,9 +73,10 @@ public interface Shop { * Gets the inventory of this shop's chest * * @return the inventory + * @throws ChestNotFoundException when there is no chest at the shop's location * @since 1.13 */ - Inventory getInventory(); + Inventory getInventory() throws ChestNotFoundException; /** * Gets whether this shop is an admin shop diff --git a/api/src/main/java/de/epiceric/shopchest/api/shop/ShopProduct.java b/api/src/main/java/de/epiceric/shopchest/api/shop/ShopProduct.java index 73b5793..202b918 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/shop/ShopProduct.java +++ b/api/src/main/java/de/epiceric/shopchest/api/shop/ShopProduct.java @@ -10,7 +10,7 @@ import org.bukkit.inventory.ItemStack; public interface ShopProduct { /** - * Gets the {@link ItemStack} with an amount of one + * Gets a copy of this product's {@link ItemStack} with an amount of one * * @return the item * @since 1.13 @@ -18,9 +18,9 @@ public interface ShopProduct { ItemStack getItemStack(); /** - * Sets the {@link ItemStack} + * Sets this product's {@link ItemStack} *

- * The passed item stack will be cloned and its amount set to one. + * The passed item stack will be copied and its amount set to one. * * @param itemStack the item * @since 1.13