Fix NPE with enchantable (#11557)

This commit is contained in:
Lulu13022002
2024-11-09 23:26:01 +01:00
parent bbc8fc8fec
commit 16f8d0f984
41 changed files with 161 additions and 110 deletions

View File

@@ -7,8 +7,8 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#TRIM_PATTERN}.
@@ -24,6 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.3")
@NullMarked
@ApiStatus.Experimental
public final class TrimPatternKeys {
/**
@@ -162,7 +163,7 @@ public final class TrimPatternKeys {
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NonNull TypedKey<TrimPattern> create(final @NonNull Key key) {
public static TypedKey<TrimPattern> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
}
}