Add Arrow/Stinger Removal Time API (#10193)

This commit is contained in:
Tamion
2024-02-09 21:56:13 +01:00
parent 6591c39509
commit 03d5d38a6a
4 changed files with 70 additions and 4 deletions

View File

@@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setArrowsInBody(int count, boolean fireEvent); // Paper
int getNextArrowRemoval();
// Paper end - Add methods for working with arrows stuck in living entities
+ // Paper start - Bee Stinger API
+ /**
@@ -40,6 +40,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param count amount of bee stingers in entity's body
+ */
+ public void setBeeStingersInBody(int count);
+
+ /**
+ * Sets the amount of ticks before the next bee stinger gets removed from the entities body.
+ * <p>
+ * A value of 0 will cause the server to re-calculate the amount of ticks on the next tick.
+ *
+ * @param ticks Amount of ticks
+ */
+ void setNextBeeStingerRemoval(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks);
+
+ /**
+ * Gets the amount of ticks before the next bee stinger gets removed from the entities body.
+ *
+ * @return ticks Amount of ticks
+ */
+ int getNextBeeStingerRemoval();
+ // Paper end - Stinger API
+
/**