Files
Paper/paper-api/src/main/java/org/bukkit/entity/Frog.java
Bukkit/Spigot ec575f5252 Update to Minecraft 1.19
By: md_5 <git@md-5.net>
2022-06-08 02:00:00 +10:00

74 lines
1.4 KiB
Java

package org.bukkit.entity;
import java.util.Locale;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* A Frog.
*/
public interface Frog extends Animals {
/**
* Gets the tongue target of this frog.
*
* @return tongue target or null if not set
*/
@Nullable
Entity getTongueTarget();
/**
* Sets the tongue target of this frog.
*
* @param target tongue target or null to clear
*/
void setTongueTarget(@Nullable Entity target);
/**
* Get the variant of this frog.
*
* @return frog variant
*/
@NotNull
Variant getVariant();
/**
* Set the variant of this frog.
*
* @param variant frog variant
*/
void setVariant(@NotNull Variant variant);
/**
* Represents the variant of a frog - ie its color.
*/
public enum Variant implements Keyed {
/**
* Temperate (brown-orange) frog.
*/
TEMPERATE,
/**
* Warm (gray) frog.
*/
WARM,
/**
* Cold (green) frog.
*/
COLD;
private final NamespacedKey key;
private Variant() {
this.key = NamespacedKey.minecraft(name().toLowerCase(Locale.ROOT));
}
@NotNull
@Override
public NamespacedKey getKey() {
return key;
}
}
}