mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
Finish converting all events to jspecify annotations
This commit is contained in:
@@ -19,11 +19,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.inventory.LoomInventory;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a player selects a banner patten in a loom inventory.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PlayerLoomPatternSelectEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -34,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerLoomPatternSelectEvent(@NotNull Player player, @NotNull LoomInventory loomInventory, @NotNull PatternType patternType) {
|
||||
+ public PlayerLoomPatternSelectEvent(final Player player, final LoomInventory loomInventory, final PatternType patternType) {
|
||||
+ super(player);
|
||||
+ this.loomInventory = loomInventory;
|
||||
+ this.patternType = patternType;
|
||||
@@ -45,7 +46,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @return the loom inventory
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public LoomInventory getLoomInventory() {
|
||||
+ return this.loomInventory;
|
||||
+ }
|
||||
@@ -55,7 +55,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @return the pattern type
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public PatternType getPatternType() {
|
||||
+ return this.patternType;
|
||||
+ }
|
||||
@@ -65,7 +64,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param patternType the pattern type
|
||||
+ */
|
||||
+ public void setPatternType(@NotNull PatternType patternType) {
|
||||
+ public void setPatternType(final PatternType patternType) {
|
||||
+ this.patternType = patternType;
|
||||
+ }
|
||||
+
|
||||
@@ -75,17 +74,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