Commits

Gavin Tantleff authored and md_5 committed 819eef734f5
#959: Add access to current item's remaining ticks
No tags

src/main/java/org/bukkit/entity/LivingEntity.java

Modified
189 189 */
190 190 public int getMaximumAir();
191 191
192 192 /**
193 193 * Sets the maximum amount of air the living entity can have, in ticks.
194 194 *
195 195 * @param ticks maximum amount of air
196 196 */
197 197 public void setMaximumAir(int ticks);
198 198
199 + /**
200 + * Gets the number of ticks remaining for the current item's usage.
201 + *
202 + * @return The number of ticks remaining
203 + */
204 + public int getItemInUseTicks();
205 +
206 + /**
207 + * Sets the number of ticks that remain for the current item's usage.
208 + * Applies to items that take time to use, like eating food, drawing a bow,
209 + * or throwing a trident.
210 + *
211 + * @param ticks The number of ticks remaining
212 + */
213 + public void setItemInUseTicks(int ticks);
214 +
199 215 /**
200 216 * Gets the time in ticks until the next arrow leaves the entity's body.
201 217 *
202 218 * @return ticks until arrow leaves
203 219 */
204 220 public int getArrowCooldown();
205 221
206 222 /**
207 223 * Sets the time in ticks until the next arrow leaves the entity's body.
208 224 *

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut