#507: Add hasDiscoveredRecipe() and getDiscoveredRecipes()

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot 2020-07-02 09:27:16 +10:00
parent ec51983b41
commit db73a4b2cf

View File

@ -1,6 +1,7 @@
package org.bukkit.entity;
import java.util.Collection;
import java.util.Set;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
@ -360,6 +361,23 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/
public int undiscoverRecipes(@NotNull Collection<NamespacedKey> recipes);
/**
* Check whether or not this entity has discovered the specified recipe.
*
* @param recipe the key of the recipe to check
*
* @return true if discovered, false otherwise
*/
public boolean hasDiscoveredRecipe(@NotNull NamespacedKey recipe);
/**
* Get an immutable set of recipes this entity has discovered.
*
* @return all discovered recipes
*/
@NotNull
public Set<NamespacedKey> getDiscoveredRecipes();
/**
* Gets the entity currently perched on the left shoulder or null if no
* entity.