From 90bc6a3c416d9802098fca1730121399d4440b68 Mon Sep 17 00:00:00 2001 From: Isaac - The456 Date: Mon, 9 Sep 2024 02:15:29 +0100 Subject: [PATCH] fix api nullability --- patches/api/0490-New-and-Improved-Lidded-API.patch | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/patches/api/0490-New-and-Improved-Lidded-API.patch b/patches/api/0490-New-and-Improved-Lidded-API.patch index 3c26fbdaa0..2c1ac64556 100644 --- a/patches/api/0490-New-and-Improved-Lidded-API.patch +++ b/patches/api/0490-New-and-Improved-Lidded-API.patch @@ -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 new file mode 100644 -index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af6255bac63d8 +index 0000000000000000000000000000000000000000..b432f070e1689b0a0c65ca8015760c8b24c4769f --- /dev/null +++ b/src/main/java/io/papermc/paper/block/Lidded.java -@@ -0,0 +1,33 @@ +@@ -0,0 +1,39 @@ +package io.papermc.paper.block; + ++import org.jetbrains.annotations.NotNull; ++ +public interface Lidded { + + /** @@ -90,12 +92,14 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625 + * + * @return the effective lid state + */ ++ @NotNull + LidState getEffectiveLidState(); + + /** + * Gets how the lid would be without any lidded mode, based on players interacting with the block. + * @return the true lid state + */ ++ @NotNull + LidState getTrueLidState(); + + /** @@ -103,6 +107,7 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625 + * + * @return the lid mode + */ ++ @NotNull + LidMode getLidMode(); + + /** @@ -111,7 +116,8 @@ index 0000000000000000000000000000000000000000..b75f79695d898c0d02968bb2c10af625 + * @param mode the new 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