Fix wrong javadoc in event and add missing event calling, fix #655

Former-commit-id: f03181525ca1a72a89d156ff79f366a71bd6750b
This commit is contained in:
sandtechnology committed 2020-11-22 10:22:04 +08:00
1 parent e95429b6cc
commit 5bda2e6ab6
11 files changed
+24 -13

No files matched your search

@@ -33,6 +33,12 @@ public class ShopControlPanelOpenEvent extends QSEvent implements Cancellable {
private final CommandSender sender;
private boolean cancelled = false;
/**
* Called before shop control panel message.
*
* @param shop The shop bought from
* @param sender The player which receiving shop control panel message
*/
public ShopControlPanelOpenEvent(@NotNull Shop shop, @NotNull CommandSender sender) {
this.shop = shop;
this.sender = sender;
@@ -39,7 +39,7 @@ public class ShopCreateEvent extends QSEvent implements Cancellable {
private boolean cancelled;
/**
* Call when have a new shop was createing.
* Call when have a new shop was creating.
*
* @param shop Target shop
* @param player The player creaing the shop
@@ -37,7 +37,7 @@ public class ShopDeleteEvent extends QSEvent implements Cancellable {
private boolean cancelled;
/**
* Call the event when shop is deleteing. The ShopUnloadEvent will call after ShopDeleteEvent
* Call the event when shop is deleting. The ShopUnloadEvent will call after ShopDeleteEvent
*
* @param shop Target shop
* @param fromMemory Only delete from the memory? false = delete both in memory and database
@@ -39,7 +39,7 @@ public class ShopInventoryPreviewEvent extends QSEvent implements Cancellable {
private boolean cancelled;
/**
* Build a event when player using GUI preview
* Called when player using GUI preview
*
* @param player Target plugin
* @param itemStack The preview item, with preview flag.
@@ -39,7 +39,8 @@ public class ShopModeratorChangedEvent extends QSEvent {
private final Shop shop;
/**
* Will call when shop price was changed.
* Will call when shop moderator was changed.
* Shop moderator included owner itself.
*
* @param shop Target shop
* @param shopModerator The shop moderator
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.NotNull;
import org.maxgamer.quickshop.shop.Shop;
/**
* Calling when shop price was changed, Can't cancel
* Calling when shop price was changed
*/
public class ShopPriceChangeEvent extends QSEvent implements Cancellable {
@@ -44,7 +44,9 @@ public class ShopProtectionCheckEvent extends QSEvent {
private final ProtectionCheckStatus status;
/**
* Will call when shop price was changed.
* Will call when checking protection by other plugin,
* This event was used to compatible with QuickShop protection checking
* Which will fire a FAKE BlockBreakEvent
*
* @param location Target location will execute protect check.
* @param status The checking status
@@ -46,8 +46,9 @@ public class ShopPurchaseEvent extends QSEvent implements Cancellable {
private boolean cancelled;
/**
* Builds a new shop purchase event This time, purchase not start, please listen the
* ShopSuccessPurchaseEvent.
* Builds a new shop purchase event
* Will called when purchase starting
* For recording purchase, please listen to ShopSuccessPurchaseEvent.
*
* @param shop The shop bought from
* @param player The player buying
@@ -28,7 +28,7 @@ import org.maxgamer.quickshop.shop.Shop;
/**
* Calling when shop sign update, Can't cancel
*/
public class ShopSignUpdatedEvent extends QSEvent {
public class ShopSignUpdateEvent extends QSEvent {
@Getter
@NotNull
@@ -39,12 +39,12 @@ public class ShopSignUpdatedEvent extends QSEvent {
private final Sign sign;
/**
* Will call when shop price was changed.
* Will call when shop sign was updated.
*
* @param shop Target shop
* @param sign Updated sign
*/
public ShopSignUpdatedEvent(@NotNull Shop shop, @NotNull Sign sign) {
public ShopSignUpdateEvent(@NotNull Shop shop, @NotNull Sign sign) {
this.shop = shop;
this.sign = sign;
}
@@ -48,8 +48,8 @@ public class ShopSuccessPurchaseEvent extends QSEvent implements Cancellable {
private boolean cancelled;
/**
* Builds a new shop purchase event This time, purchase not start, please listen the
* ShopSuccessPurchaseEvent.
* Builds a new shop purchase event
* Will called when purchase ended
*
* @param shop The shop bought from
* @param player The player buying
@@ -859,6 +859,7 @@ public class ContainerShop implements Shop {
Util.debugLog("Skipped new sign text setup: Same content");
continue;
}
Bukkit.getPluginManager().callEvent(new ShopSignUpdateEvent(this, sign));
for (int i = 0; i < lines.length; i++) {
sign.setLine(i, lines[i]);
}