From d00c26ef4042c34cb9bf9d5700603a94f167d68b Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Thu, 31 Oct 2024 12:28:31 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20moved=20admin=20event=20to=20new?= =?UTF-8?q?=20api=20pkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Took 26 seconds --- .../api/event/AuctionAdminEvent.java | 31 +++++++++++++++++-- .../auctionhouse/guis/admin/GUIAdminItem.java | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/main/java/ca/tweetzy/auctionhouse/api/event/AuctionAdminEvent.java b/src/main/java/ca/tweetzy/auctionhouse/api/event/AuctionAdminEvent.java index 1e30fc0..76d9a17 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/api/event/AuctionAdminEvent.java +++ b/src/main/java/ca/tweetzy/auctionhouse/api/event/AuctionAdminEvent.java @@ -1,4 +1,31 @@ package ca.tweetzy.auctionhouse.api.event; -public final class AuctionAdminEvent { -} +import ca.tweetzy.auctionhouse.auction.AuctionAdminLog; +import lombok.Getter; +import lombok.Setter; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +@Getter +@Setter +public final class AuctionAdminEvent extends Event implements Cancellable { + + private static final HandlerList handlers = new HandlerList(); + private boolean cancelled; + + private final AuctionAdminLog auctionAdminLog; + + public AuctionAdminEvent(AuctionAdminLog auctionAdminLog) { + this.auctionAdminLog = auctionAdminLog; + } + + + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } +} \ No newline at end of file diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/admin/GUIAdminItem.java b/src/main/java/ca/tweetzy/auctionhouse/guis/admin/GUIAdminItem.java index 486341d..a8ced05 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/admin/GUIAdminItem.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/admin/GUIAdminItem.java @@ -25,7 +25,7 @@ import ca.tweetzy.auctionhouse.auction.AuctionPlayer; import ca.tweetzy.auctionhouse.auction.AuctionedItem; import ca.tweetzy.auctionhouse.auction.enums.AdminAction; import ca.tweetzy.auctionhouse.auction.enums.PaymentReason; -import ca.tweetzy.auctionhouse.events.AuctionAdminEvent; +import ca.tweetzy.auctionhouse.api.event.AuctionAdminEvent; import ca.tweetzy.auctionhouse.guis.AuctionBaseGUI; import ca.tweetzy.auctionhouse.guis.core.GUIAuctionHouse; import ca.tweetzy.auctionhouse.settings.Settings;