Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 68de2de253
commit cd27f1b0c7
62 changed files with 1914 additions and 156 deletions

View File

@@ -256,6 +256,37 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/
public void setCooldown(@NotNull Material material, int ticks);
/**
* Check whether a cooldown is active on the specified item.
*
* @param item the item to check
* @return if a cooldown is active on the item
*/
public boolean hasCooldown(@NotNull ItemStack item);
/**
* Get the cooldown time in ticks remaining for the specified item.
*
* @param item the item to check
* @return the remaining cooldown time in ticks
*/
public int getCooldown(@NotNull ItemStack item);
/**
* Set a cooldown on the specified item for a certain amount of ticks.
* ticks. 0 ticks will result in the removal of the cooldown.
* <p>
* Cooldowns are used by the server for items such as ender pearls and
* shields to prevent them from being used repeatedly.
* <p>
* Note that cooldowns will not by themselves stop an item from being used
* for attacking.
*
* @param item the item to set the cooldown for
* @param ticks the amount of ticks to set or 0 to remove
*/
public void setCooldown(@NotNull ItemStack item, int ticks);
/**
* Get the sleep ticks of the player. This value may be capped.
*