mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 21:22:05 -07:00
Finish converting all events to jspecify annotations
This commit is contained in:
@@ -18,22 +18,23 @@ 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.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a player clicks a recipe in the recipe book
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PlayerRecipeBookClickEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ @NotNull private NamespacedKey recipe;
|
||||
+ private NamespacedKey recipe;
|
||||
+ private boolean makeAll;
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerRecipeBookClickEvent(@NotNull Player player, @NotNull NamespacedKey recipe, boolean makeAll) {
|
||||
+ public PlayerRecipeBookClickEvent(final Player player, final NamespacedKey recipe, final boolean makeAll) {
|
||||
+ super(player);
|
||||
+ this.recipe = recipe;
|
||||
+ this.makeAll = makeAll;
|
||||
@@ -44,7 +45,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @return The namespaced key of the recipe
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public NamespacedKey getRecipe() {
|
||||
+ return this.recipe;
|
||||
+ }
|
||||
@@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param recipe The key of the recipe that should be requested
|
||||
+ */
|
||||
+ public void setRecipe(@NotNull NamespacedKey recipe) {
|
||||
+ public void setRecipe(final NamespacedKey recipe) {
|
||||
+ this.recipe = recipe;
|
||||
+ }
|
||||
+
|
||||
@@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param makeAll {@code true} if the request should attempt to make the maximum amount of results
|
||||
+ */
|
||||
+ public void setMakeAll(boolean makeAll) {
|
||||
+ public void setMakeAll(final boolean makeAll) {
|
||||
+ this.makeAll = makeAll;
|
||||
+ }
|
||||
+
|
||||
@@ -84,17 +84,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