From e0955fd24afcdf4724e1818ec661ef3735c52487 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 4 Jul 2021 09:31:17 +1000 Subject: [PATCH] SPIGOT-6527: Add AxolotlBucketMeta By: Doc --- .../inventory/meta/AxolotlBucketMeta.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 paper-api/src/main/java/org/bukkit/inventory/meta/AxolotlBucketMeta.java diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/AxolotlBucketMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/AxolotlBucketMeta.java new file mode 100644 index 0000000000..f7d457ab1e --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/inventory/meta/AxolotlBucketMeta.java @@ -0,0 +1,39 @@ +package org.bukkit.inventory.meta; + +import org.bukkit.entity.Axolotl; +import org.jetbrains.annotations.NotNull; + +/** + * Represents a bucket of axolotl. + */ +public interface AxolotlBucketMeta extends ItemMeta { + + /** + * Get the variant of the axolotl in the bucket. + *

+ * Plugins should check that hasVariant() returns true before + * calling this method. + * @return axolotl variant + */ + @NotNull + Axolotl.Variant getVariant(); + + /** + * Set the variant of this axolotl in the bucket. + * + * @param variant axolotl variant + */ + void setVariant(@NotNull Axolotl.Variant variant); + + /** + * Checks for existence of a variant tag indicating a specific axolotl will be + * spawned. + * + * @return if there is a variant + */ + boolean hasVariant(); + + @Override + @NotNull + AxolotlBucketMeta clone(); +}