mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -58,18 +58,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.inventory.InventoryView;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+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;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an item is put in an inventory containing a result slot
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PrepareResultEvent extends PrepareInventoryResultEvent {
|
||||
+
|
||||
+ // HandlerList on PrepareInventoryResultEvent to ensure api compat
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PrepareResultEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
|
||||
+ public PrepareResultEvent(final InventoryView inventory, final @Nullable ItemStack result) {
|
||||
+ super(inventory, result);
|
||||
+ }
|
||||
+
|
||||
@@ -78,8 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @return result item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public ItemStack getResult() {
|
||||
+ public @Nullable ItemStack getResult() {
|
||||
+ return super.getResult();
|
||||
+ }
|
||||
+
|
||||
@@ -88,7 +88,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param result result item
|
||||
+ */
|
||||
+ public void setResult(@Nullable ItemStack result) {
|
||||
+ public void setResult(final @Nullable ItemStack result) {
|
||||
+ super.setResult(result);
|
||||
+ }
|
||||
+}
|
||||
|
Reference in New Issue
Block a user