Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
parent
fa1f6a5d78
commit
64e918335c
62 changed files with 580 additions and 750 deletions
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockFormEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Called when the {@link EnderDragon} is defeated (killed) in a {@link DragonBattle},
|
||||
|
@ -30,6 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * <b>This event might be cancelled by default depending on
|
||||
+ * e.g. {@link DragonBattle#hasBeenPreviouslyKilled()} and server configuration.</b>
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class DragonEggFormEvent extends BlockFormEvent {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
@ -37,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ private final DragonBattle dragonBattle;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public DragonEggFormEvent(@NotNull Block block, @NotNull BlockState newState, @NotNull DragonBattle dragonBattle) {
|
||||
+ public DragonEggFormEvent(final Block block, final BlockState newState, final DragonBattle dragonBattle) {
|
||||
+ super(block, newState);
|
||||
+ this.dragonBattle = dragonBattle;
|
||||
+ }
|
||||
|
@ -49,18 +50,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the dragon battle
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public DragonBattle getDragonBattle() {
|
||||
+ return this.dragonBattle;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue