mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Use #getSafe
This commit is contained in:
parent
3dd35c1605
commit
c9f234cb1d
@ -43,7 +43,7 @@ public interface EntityType extends ProtocolObject, EntityTypeConstants {
|
||||
}
|
||||
|
||||
static EntityType fromNamespaceId(@NotNull String namespaceID) {
|
||||
return EntityTypeImpl.get(namespaceID);
|
||||
return EntityTypeImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static EntityType fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -36,7 +36,7 @@ public interface Enchantment extends ProtocolObject, EnchantmentConstants {
|
||||
}
|
||||
|
||||
static @Nullable Enchantment fromNamespaceId(@NotNull String namespaceID) {
|
||||
return EnchantmentImpl.get(namespaceID);
|
||||
return EnchantmentImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable Enchantment fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -65,7 +65,7 @@ public interface Material extends ProtocolObject, MaterialConstants {
|
||||
}
|
||||
|
||||
static @Nullable Material fromNamespaceId(@NotNull String namespaceID) {
|
||||
return MaterialImpl.get(namespaceID);
|
||||
return MaterialImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable Material fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -16,7 +16,7 @@ public interface Particle extends ProtocolObject, ParticleConstants {
|
||||
}
|
||||
|
||||
static @Nullable Particle fromNamespaceId(@NotNull String namespaceID) {
|
||||
return ParticleImpl.get(namespaceID);
|
||||
return ParticleImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable Particle fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -31,7 +31,7 @@ public interface PotionEffect extends ProtocolObject, PotionEffectConstants {
|
||||
}
|
||||
|
||||
static @Nullable PotionEffect fromNamespaceId(@NotNull String namespaceID) {
|
||||
return PotionEffectImpl.get(namespaceID);
|
||||
return PotionEffectImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable PotionEffect fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -16,7 +16,7 @@ public interface PotionType extends ProtocolObject, PotionTypeConstants {
|
||||
}
|
||||
|
||||
static @Nullable PotionType fromNamespaceId(@NotNull String namespaceID) {
|
||||
return PotionTypeImpl.get(namespaceID);
|
||||
return PotionTypeImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable PotionType fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
@ -16,7 +16,7 @@ public interface SoundEvent extends ProtocolObject, SoundEventConstants {
|
||||
}
|
||||
|
||||
static @Nullable SoundEvent fromNamespaceId(@NotNull String namespaceID) {
|
||||
return SoundEventImpl.get(namespaceID);
|
||||
return SoundEventImpl.getSafe(namespaceID);
|
||||
}
|
||||
|
||||
static @Nullable SoundEvent fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
||||
|
Loading…
Reference in New Issue
Block a user