Fix NPE with enchantable (#11557)
This commit is contained in:
@@ -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.potion.PotionEffectType;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#MOB_EFFECT}.
|
||||
@@ -24,6 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.3")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class MobEffectKeys {
|
||||
/**
|
||||
@@ -302,7 +303,7 @@ public final class MobEffectKeys {
|
||||
private MobEffectKeys() {
|
||||
}
|
||||
|
||||
private static @NonNull TypedKey<PotionEffectType> create(final @NonNull Key key) {
|
||||
private static TypedKey<PotionEffectType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.MOB_EFFECT, key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user