From 04b47e2bb049a2a4d0be7c68860102b2e1d57bc9 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 13 Aug 2019 23:22:35 +0200 Subject: [PATCH] Small update to API documentation --- api/src/main/java/de/epiceric/shopchest/api/shop/Shop.java | 6 ++++-- .../java/de/epiceric/shopchest/api/shop/ShopProduct.java | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) 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