mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 13:42:25 -07:00
Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -18,7 +18,7 @@ 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 an entity enters the hitbox of a block.
|
||||
@@ -53,6 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * <li>Wither rose</li>
|
||||
+ * </ul>
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class EntityInsideBlockEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -61,7 +62,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EntityInsideBlockEvent(@NotNull Entity entity, @NotNull Block block) {
|
||||
+ public EntityInsideBlockEvent(final Entity entity, final Block block) {
|
||||
+ super(entity);
|
||||
+ this.block = block;
|
||||
+ }
|
||||
@@ -71,7 +72,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @return the block
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Block getBlock() {
|
||||
+ return this.block;
|
||||
+ }
|
||||
@@ -82,17 +82,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