mirror of https://github.com/Minestom/Minestom.git
30 lines
890 B
Java
30 lines
890 B
Java
package net.minestom.server.potion;
|
|
|
|
import net.minestom.server.registry.ProtocolObject;
|
|
import net.minestom.server.utils.NamespaceID;
|
|
import org.jetbrains.annotations.ApiStatus;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import java.util.Collection;
|
|
|
|
@ApiStatus.NonExtendable
|
|
public interface PotionType extends ProtocolObject, PotionTypeConstants {
|
|
|
|
static @NotNull Collection<@NotNull PotionType> values() {
|
|
return PotionTypeLoader.values();
|
|
}
|
|
|
|
static @Nullable PotionType fromNamespaceId(@NotNull String namespaceID) {
|
|
return PotionTypeLoader.get(namespaceID);
|
|
}
|
|
|
|
static @Nullable PotionType fromNamespaceId(@NotNull NamespaceID namespaceID) {
|
|
return fromNamespaceId(namespaceID.asString());
|
|
}
|
|
|
|
static @Nullable PotionType fromId(int id) {
|
|
return PotionTypeLoader.getId(id);
|
|
}
|
|
}
|