mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -17,13 +17,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a Creeper is ignited either by a
|
||||
+ * flint and steel, {@link Creeper#ignite()} or
|
||||
+ * {@link Creeper#setIgnited(boolean)}.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class CreeperIgniteEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -32,12 +33,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public CreeperIgniteEvent(@NotNull Creeper creeper, boolean ignited) {
|
||||
+ public CreeperIgniteEvent(final Creeper creeper, final boolean ignited) {
|
||||
+ super(creeper);
|
||||
+ this.ignited = ignited;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Creeper getEntity() {
|
||||
+ return (Creeper) super.getEntity();
|
||||
@@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.ignited;
|
||||
+ }
|
||||
+
|
||||
+ public void setIgnited(boolean ignited) {
|
||||
+ public void setIgnited(final boolean ignited) {
|
||||
+ this.ignited = ignited;
|
||||
+ }
|
||||
+
|
||||
@@ -55,17 +55,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ public void setCancelled(final boolean cancel) {
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user