Finish converting all events to jspecify annotations
This commit is contained in:
parent
fa97c59a4e
commit
29a25df60e
78 changed files with 757 additions and 883 deletions
|
@ -19,9 +19,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.jspecify.annotations.Nullable;
|
||||
+
|
||||
+@NullMarked
|
||||
+public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
@ -29,12 +30,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ private final FailReason failReason;
|
||||
+ private final Block bed;
|
||||
+ private boolean willExplode;
|
||||
+ private Component message;
|
||||
+ private @Nullable Component message;
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerBedFailEnterEvent(@NotNull Player player, @NotNull FailReason failReason, @NotNull Block bed, boolean willExplode, @Nullable Component message) {
|
||||
+ public PlayerBedFailEnterEvent(final Player player, final FailReason failReason, final Block bed, final boolean willExplode, final @Nullable Component message) {
|
||||
+ super(player);
|
||||
+ this.failReason = failReason;
|
||||
+ this.bed = bed;
|
||||
|
@ -42,12 +43,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.message = message;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public FailReason getFailReason() {
|
||||
+ return this.failReason;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public Block getBed() {
|
||||
+ return this.bed;
|
||||
+ }
|
||||
|
@ -56,16 +55,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return this.willExplode;
|
||||
+ }
|
||||
+
|
||||
+ public void setWillExplode(boolean willExplode) {
|
||||
+ public void setWillExplode(final boolean willExplode) {
|
||||
+ this.willExplode = willExplode;
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public Component getMessage() {
|
||||
+ public @Nullable Component getMessage() {
|
||||
+ return this.message;
|
||||
+ }
|
||||
+
|
||||
+ public void setMessage(@Nullable Component message) {
|
||||
+ public void setMessage(final @Nullable Component message) {
|
||||
+ this.message = message;
|
||||
+ }
|
||||
+
|
||||
|
@ -81,17 +79,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * that may occur because of the interaction.
|
||||
+ */
|
||||
+ @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;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue