[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

@@ -42,10 +42,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * disabled in the first place.
+ */
+public class PlayerShieldDisableEvent extends PlayerEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final Entity damager;
+ private int cooldown;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
@@ -62,7 +64,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public Entity getDamager() {
+ return damager;
+ return this.damager;
+ }
+
+ /**
@@ -74,7 +76,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return cooldown in ticks
+ */
+ public int getCooldown() {
+ return cooldown;
+ return this.cooldown;
+ }
+
+ /**
@@ -90,23 +92,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.cooldown = cooldown;
+ }
+
+ /**
+ * Gets the cancellation state of this event. A cancelled event will not
+ * be executed in the server, but will still pass to other plugins
+ *
+ * @return true if this event is cancelled
+ */
+ @Override
+ public boolean isCancelled() {
+ return this.cancelled;
+ }
+
+ /**
+ * Sets the cancellation state of this event. A cancelled event will not
+ * be executed in the server, but will still pass to other plugins.
+ *
+ * @param cancel true if you wish to cancel this event
+ */
+ @Override
+ public void setCancelled(final boolean cancel) {
+ this.cancelled = cancel;