mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Swap some nullable annotations (#9696)
This commit is contained in:
@@ -18,6 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.potion.PotionEffectType;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -25,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * Called when a player sets the effect for a beacon
|
||||
+ */
|
||||
+public class PlayerChangeBeaconEffectEvent extends PlayerEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private PotionEffectType primary;
|
||||
+ private PotionEffectType secondary;
|
||||
@@ -34,7 +35,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private boolean isCancelled;
|
||||
+
|
||||
+ public PlayerChangeBeaconEffectEvent(@NotNull Player player, @Nullable PotionEffectType primary, @Nullable PotionEffectType secondary, @Nullable Block beacon) {
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerChangeBeaconEffectEvent(@NotNull Player player, @Nullable PotionEffectType primary, @Nullable PotionEffectType secondary, @NotNull Block beacon) {
|
||||
+ super(player);
|
||||
+ this.primary = primary;
|
||||
+ this.secondary = secondary;
|
||||
@@ -80,9 +82,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return the beacon block associated with this event, or null if not found
|
||||
+ * @return the beacon block associated with this event
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public Block getBeacon() {
|
||||
+ return beacon;
|
||||
+ }
|
||||
@@ -143,11 +145,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
|
Reference in New Issue
Block a user