mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 12:12:08 -07:00
[ci skip] Cleanup events (#10202)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user