diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopBuySellEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopBuySellEvent.java index 9fbd8e4..985e278 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopBuySellEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopBuySellEvent.java @@ -7,6 +7,8 @@ import org.bukkit.event.Cancellable; /** * Called when a player buys or sells something from or to a shop + * + * @since 1.13 */ public class ShopBuySellEvent extends ShopEvent implements Cancellable { private Type type; @@ -22,21 +24,30 @@ public class ShopBuySellEvent extends ShopEvent implements Cancellable { } /** - * @return Whether the player buys or sells something + * Gets whether the type of transaction is a buy or a sell + * + * @return the type of transaction + * @since 1.13 */ public Type getType() { return type; } /** - * @return The amount which might be modified because of automatic item amount calculation + * Gets the amount which might be modified because of automatic item amount calculation + * + * @return the amount + * @since 1.13 */ public int getAmount() { return amount; } /** - * @return The price which might be modified because of automatic item amount calculation + * Gets the price which might be modified because of automatic item amount calculation + * + * @return the price + * @since 1.13 */ public double getPrice() { return price; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopCreateEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopCreateEvent.java index 4e23a88..bf88123 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopCreateEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopCreateEvent.java @@ -5,7 +5,9 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * Called when a player creates a shop (clicks on a chest) + * Called when a player clicks a chest to create a shop + * + * @since 1.13 */ public class ShopCreateEvent extends ShopEvent implements Cancellable { private double creationPrice; @@ -15,8 +17,14 @@ public class ShopCreateEvent extends ShopEvent implements Cancellable { super(player, shop); this.creationPrice = creationPrice; } + /** - * @return The price the player has to pay in order to create the shop (only if the event is not cancelled) + * Gets the price the player has to pay in order to create the shop + *

+ * The price is only paid if the event is not cancelled. + * + * @return the creation price + * @since 1.13 */ public double getCreationPrice() { return creationPrice; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopEvent.java index 0022ea3..1a5327e 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopEvent.java @@ -5,6 +5,11 @@ import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +/** + * Represents a shop related event + * + * @since 1.13 + */ public abstract class ShopEvent extends Event { private static final HandlerList handlers = new HandlerList(); @@ -17,14 +22,20 @@ public abstract class ShopEvent extends Event { } /** - * @return Shop which is involved in this event + * Get the shop which is involved in this event + * + * @return the shop + * @since 1.13 */ public Shop getShop() { return shop; } /** - * @return Player who is involved in this event + * Gets the player who is involved in this event + * + * @return the player + * @since 1.13 */ public Player getPlayer() { return player; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopExtendEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopExtendEvent.java index 59535e6..d765207 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopExtendEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopExtendEvent.java @@ -7,7 +7,9 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * Called when a player extends a shop (making a chest a double chest) + * Called when a player extends a shop's chest to a double chest + * + * @since 1.13 */ public class ShopExtendEvent extends ShopEvent implements Cancellable { private boolean cancelled; @@ -19,7 +21,10 @@ public class ShopExtendEvent extends ShopEvent implements Cancellable { } /** - * @return Location of the placed chest + * Gets the location of the placed chest + * + * @return the location of the placed chest + * @since 1.13 */ public Location getNewChestLocation() { return newChestLocation; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopInfoEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopInfoEvent.java index 483b95e..24e6d3f 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopInfoEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopInfoEvent.java @@ -5,7 +5,9 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * Called when a player retrieves information about a shop (clicks on a chest) + * Called when a player clicks a shop to retrieve information about it + * + * @since 1.13 */ public class ShopInfoEvent extends ShopEvent implements Cancellable { private boolean cancelled; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopInitializedEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopInitializedEvent.java index fe07b86..c6a64eb 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopInitializedEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopInitializedEvent.java @@ -3,6 +3,11 @@ package de.epiceric.shopchest.api.event; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +/** + * Called after all shops are initialized after the plugin is enabled + * + * @since 1.13 + */ public class ShopInitializedEvent extends Event { private static final HandlerList handlers = new HandlerList(); @@ -12,6 +17,12 @@ public class ShopInitializedEvent extends Event { this.amount = amount; } + /** + * Gets the amount of shops that were initialized + * + * @return the amount of shops + * @since 1.13 + */ public int getAmount() { return amount; } diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopOpenEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopOpenEvent.java index b23c230..b830d90 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopOpenEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopOpenEvent.java @@ -5,7 +5,9 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * Called when a player opens a shop (clicks on a chest) + * Called when a player clicks a shop to open it + * + * @since 1.13 */ public class ShopOpenEvent extends ShopEvent implements Cancellable { private boolean cancelled; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreCreateEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreCreateEvent.java index a2e5b02..5b0f311 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreCreateEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreCreateEvent.java @@ -8,7 +8,9 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Called when a player wants to create a shop (enters the command) + * Called when a player enters the command to create a shop + * + * @since 1.13 */ public class ShopPreCreateEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -29,35 +31,50 @@ public class ShopPreCreateEvent extends Event implements Cancellable { } /** + * Gets the player who is involved in this event + * * @return the player + * @since 1.13 */ public Player getPlayer() { return player; } /** + * Gets the product the shop will sell or buy + * * @return the product + * @since 1.13 */ public ShopProduct getProduct() { return product; } /** - * @return the buyPrice + * Gets the price for which players will be able to buy from the shop + * + * @return the buy price + * @since 1.13 */ public double getBuyPrice() { return buyPrice; } /** - * @return the sellPrice + * Gets the price for which players will be able to sell to the shop + * + * @return the sell price + * @since 1.13 */ public double getSellPrice() { return sellPrice; } /** - * @return the admin + * Gets whether the shop will be an admin shop + * + * @return whether the shop will be an admin shop + * @since 1.13 */ public boolean isAdminShop() { return admin; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreInfoEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreInfoEvent.java index e2305dc..a83c4ca 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreInfoEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreInfoEvent.java @@ -6,7 +6,9 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Called when a player wants to retrieve information about a shop (enters the command) + * Called when a player enters the command to retrieve information about a shop + * + * @since 1.13 */ public class ShopPreInfoEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -19,7 +21,10 @@ public class ShopPreInfoEvent extends Event implements Cancellable { } /** - * @return Player who is involved in this event + * Gets the player who is involved in this event + * + * @return the player + * @since 1.13 */ public Player getPlayer() { return player; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreOpenEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreOpenEvent.java index 885f9da..ce30cb7 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreOpenEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreOpenEvent.java @@ -6,7 +6,9 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Called when a player wants to open a shop (enters the command) + * Called when a player enters the command to open a shop + * + * @since 1.13 */ public class ShopPreOpenEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -19,7 +21,10 @@ public class ShopPreOpenEvent extends Event implements Cancellable { } /** - * @return Player who is involved in this event + * Get the player who is involved in this event + * + * @return the player + * @since 1.13 */ public Player getPlayer() { return player; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreRemoveEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreRemoveEvent.java index 95d8c0f..5ed0484 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreRemoveEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreRemoveEvent.java @@ -6,7 +6,9 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Called when a player wants to remove a shop (enters the command) + * Called when a player enters the command to remove a shop + * + * @since 1.13 */ public class ShopPreRemoveEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -19,7 +21,10 @@ public class ShopPreRemoveEvent extends Event implements Cancellable { } /** - * @return Player who is involved in this event + * Gets the player who is involved in this event + * + * @return the player + * @since 1.13 */ public Player getPlayer() { return player; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopReloadEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopReloadEvent.java index 0e6c521..e946869 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopReloadEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopReloadEvent.java @@ -6,7 +6,9 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Called when a player reloads the shops + * Called when the shops are reloaded by a command + * + * @since 1.13 */ public class ShopReloadEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -19,7 +21,10 @@ public class ShopReloadEvent extends Event implements Cancellable { } /** - * @return Sender who triggered the reload + * Gets the sender that entered the reload command + * + * @return the sender + * @since 1.13 */ public CommandSender getSender() { return sender; diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveAllEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveAllEvent.java index 49463ff..aad6ddd 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveAllEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveAllEvent.java @@ -9,6 +9,11 @@ import org.bukkit.event.HandlerList; import java.util.List; +/** + * Called when a player enters the command to remove all shops of a player + * + * @since 1.13 + */ public class ShopRemoveAllEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); @@ -23,14 +28,34 @@ public class ShopRemoveAllEvent extends Event implements Cancellable { this.shops = shops; } + /** + * Gets the sender that entered the reload command + * + * @return the sender + * @since 1.13 + */ public CommandSender getSender() { return sender; } + /** + * Gets the player whose shops will be removed + * + * @return the vendor + * @since 1.13 + */ public OfflinePlayer getVendor() { return vendor; } + /** + * Gets the shops that will be removed + *

+ * This list can be modified to include or exclude certain shops. + * + * @return a modifiable list of shops + * @since 1.13 + */ public List getShops() { return shops; } diff --git a/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveEvent.java b/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveEvent.java index d0dd01e..c37934c 100644 --- a/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveEvent.java +++ b/api/src/main/java/de/epiceric/shopchest/api/event/ShopRemoveEvent.java @@ -5,7 +5,9 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * Called when a player removes a shop (clicks on a chest) + * Called when a player enters the command to remove a shop + * + * @since 1.13 */ public class ShopRemoveEvent extends ShopEvent implements Cancellable { private boolean cancelled;