mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 07:02:18 -07:00
Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -17,11 +17,12 @@ 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;
|
||||
+
|
||||
+/**
|
||||
+ * Is called when an entity sits down or stands up.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class EntityToggleSitEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -30,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EntityToggleSitEvent(@NotNull Entity entity, boolean isSitting) {
|
||||
+ public EntityToggleSitEvent(final Entity entity, final boolean isSitting) {
|
||||
+ super(entity);
|
||||
+ this.isSitting = isSitting;
|
||||
+ }
|
||||
@@ -50,17 +51,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ 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