Fire Immunity API

This commit is contained in:
Racci
2025-01-12 16:55:19 -08:00
committed by granny
parent 9f2dd3d932
commit 0318f1ccfb
9 changed files with 101 additions and 134 deletions

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1172,4 +_,44 @@
@@ -1172,4 +_,59 @@
*/
void broadcastHurtAnimation(@NotNull java.util.Collection<Player> players);
// Paper end - broadcast hurt animation
@@ -44,4 +44,19 @@
+ */
+ boolean isInDaylight();
+ // Purpur end - API for any mob to burn daylight
+
+ // Purpur start - Fire Immunity API
+ /**
+ * Checks if the entity is fire immune
+ *
+ * @return True if fire immune
+ */
+ boolean isImmuneToFire();
+
+ /**
+ * Sets if the entity is fire immune
+ * Set this to null to restore the entity type default
+ */
+ void setImmuneToFire(@Nullable Boolean fireImmune);
+ // Purpur end - Fire Immunity API
}