[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002
2024-02-01 10:15:57 +01:00
parent d676979ea0
commit f7e469eb2e
187 changed files with 2415 additions and 2258 deletions

View File

@@ -18,18 +18,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when a player receives an item cooldown.
+ */
+public class PlayerItemCooldownEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ @NotNull
+ private final Material type;
+ private boolean cancelled;
+ private int cooldown;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
+ public PlayerItemCooldownEvent(@NotNull Player player, @NotNull Material type, int cooldown) {
+ super(player);
+ this.type = type;
@@ -43,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public Material getType() {
+ return type;
+ return this.type;
+ }
+
+ /**
@@ -52,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return cooldown in ticks
+ */
+ public int getCooldown() {
+ return cooldown;
+ return this.cooldown;
+ }
+
+ /**
@@ -68,7 +73,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ return this.cancelled;
+ }
+
+ @Override
@@ -79,11 +84,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ return HANDLER_LIST;
+ }
+}