mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -13,19 +13,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import com.google.common.collect.ImmutableList;
|
||||
+import java.util.List;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.entity.SkeletonHorse;
|
||||
+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 java.util.List;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Event called when a player gets close to a skeleton horse and triggers the lightning trap
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -35,23 +35,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Deprecated
|
||||
+ @ApiStatus.Internal
|
||||
+ public SkeletonHorseTrapEvent(@NotNull SkeletonHorse horse) {
|
||||
+ public SkeletonHorseTrapEvent(final SkeletonHorse horse) {
|
||||
+ this(horse, ImmutableList.of());
|
||||
+ }
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public SkeletonHorseTrapEvent(@NotNull SkeletonHorse horse, @NotNull List<HumanEntity> eligibleHumans) {
|
||||
+ public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
|
||||
+ super(horse);
|
||||
+ this.eligibleHumans = eligibleHumans;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public SkeletonHorse getEntity() {
|
||||
+ return (SkeletonHorse) super.getEntity();
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public List<HumanEntity> getEligibleHumans() {
|
||||
+ return this.eligibleHumans;
|
||||
+ }
|
||||
@@ -62,17 +60,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