Finish converting all events to jspecify annotations
This commit is contained in:
parent
ea00be3aaa
commit
ba3c29b92e
82 changed files with 977 additions and 1103 deletions
|
@ -6,10 +6,10 @@ Subject: [PATCH] Added PlayerBedFailEnterEvent
|
|||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerBedFailEnterEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerBedFailEnterEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6cd803e108dc2e6c0b8afda123123450403ef729
|
||||
index 0000000000000000000000000000000000000000..393d127463a6b396f6bd953f538828da23572f33
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/player/PlayerBedFailEnterEvent.java
|
||||
@@ -0,0 +1,119 @@
|
||||
@@ -0,0 +1,115 @@
|
||||
+package io.papermc.paper.event.player;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
|
@ -19,9 +19,10 @@ index 0000000000000000000000000000000000000000..6cd803e108dc2e6c0b8afda123123450
|
|||
+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..6cd803e108dc2e6c0b8afda123123450
|
|||
+ 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..6cd803e108dc2e6c0b8afda123123450
|
|||
+ this.message = message;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public FailReason getFailReason() {
|
||||
+ return this.failReason;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public Block getBed() {
|
||||
+ return this.bed;
|
||||
+ }
|
||||
|
@ -56,16 +55,15 @@ index 0000000000000000000000000000000000000000..6cd803e108dc2e6c0b8afda123123450
|
|||
+ 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..6cd803e108dc2e6c0b8afda123123450
|
|||
+ * 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