Swap some nullable annotations (#9696)
This commit is contained in:
@@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a Warden's anger level has changed due to another entity.
|
||||
@@ -29,13 +29,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+public class WardenAngerChangeEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+ private final Entity target;
|
||||
+ private final int oldAnger;
|
||||
+ private int newAnger;
|
||||
+
|
||||
+ public WardenAngerChangeEvent(@NotNull final Warden warden, @Nullable final Entity target, final int oldAnger, final int newAnger) {
|
||||
+ @ApiStatus.Internal
|
||||
+ public WardenAngerChangeEvent(@NotNull final Warden warden, @NotNull final Entity target, final int oldAnger, final int newAnger) {
|
||||
+ super(warden);
|
||||
+ this.target = target;
|
||||
+ this.oldAnger = oldAnger;
|
||||
@@ -43,11 +45,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the entity (if any) which triggered this anger update.
|
||||
+ * Gets the entity which triggered this anger update.
|
||||
+ *
|
||||
+ * @return triggering entity, or null
|
||||
+ * @return triggering entity
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public Entity getTarget() {
|
||||
+ return target;
|
||||
+ }
|
||||
@@ -107,11 +109,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
|
||||
Reference in New Issue
Block a user