fix api nullability

This commit is contained in:
Isaac - The456 2024-09-09 02:15:29 +01:00
parent 2849819ef9
commit 90bc6a3c41
No known key found for this signature in database
GPG Key ID: 57A848D2F87C14EF

View File

@ -77,12 +77,14 @@ index 0000000000000000000000000000000000000000..ea775e7cd28b68e520d1381eee8c732f
+} +}
diff --git a/src/main/java/io/papermc/paper/block/Lidded.java b/src/main/java/io/papermc/paper/block/Lidded.java diff --git a/src/main/java/io/papermc/paper/block/Lidded.java b/src/main/java/io/papermc/paper/block/Lidded.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af6255bac63d8 index 0000000000000000000000000000000000000000..b432f070e1689b0a0c65ca8015760c8b24c4769f
--- /dev/null --- /dev/null
+++ b/src/main/java/io/papermc/paper/block/Lidded.java +++ b/src/main/java/io/papermc/paper/block/Lidded.java
@@ -0,0 +1,33 @@ @@ -0,0 +1,39 @@
+package io.papermc.paper.block; +package io.papermc.paper.block;
+ +
+import org.jetbrains.annotations.NotNull;
+
+public interface Lidded { +public interface Lidded {
+ +
+ /** + /**
@ -90,12 +92,14 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625
+ * + *
+ * @return the effective lid state + * @return the effective lid state
+ */ + */
+ @NotNull
+ LidState getEffectiveLidState(); + LidState getEffectiveLidState();
+ +
+ /** + /**
+ * Gets how the lid would be without any lidded mode, based on players interacting with the block. + * Gets how the lid would be without any lidded mode, based on players interacting with the block.
+ * @return the true lid state + * @return the true lid state
+ */ + */
+ @NotNull
+ LidState getTrueLidState(); + LidState getTrueLidState();
+ +
+ /** + /**
@ -103,6 +107,7 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625
+ * + *
+ * @return the lid mode + * @return the lid mode
+ */ + */
+ @NotNull
+ LidMode getLidMode(); + LidMode getLidMode();
+ +
+ /** + /**
@ -111,7 +116,8 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625
+ * @param mode the new lid mode + * @param mode the new lid mode
+ * @return the actually set lid mode + * @return the actually set lid mode
+ */ + */
+ LidMode setLidMode(LidMode mode); + @NotNull
+ LidMode setLidMode(@NotNull LidMode mode);
+ +
+} +}
diff --git a/src/main/java/org/bukkit/block/Barrel.java b/src/main/java/org/bukkit/block/Barrel.java diff --git a/src/main/java/org/bukkit/block/Barrel.java b/src/main/java/org/bukkit/block/Barrel.java