Paper/patches/unapplied/api/0300-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
2021-11-30 19:26:33 +01:00

56 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MeFisto94 <MeFisto94@users.noreply.github.com>
Date: Tue, 11 May 2021 00:48:51 +0200
Subject: [PATCH] Add a "should burn in sunlight" API for Phantoms and
Skeletons
diff --git a/src/main/java/org/bukkit/entity/Phantom.java b/src/main/java/org/bukkit/entity/Phantom.java
index ed4d417c2deefb78807cb61b01df5afcd334d754..a40b045f08b85e22e75459b547e7e7c0b95103ed 100644
--- a/src/main/java/org/bukkit/entity/Phantom.java
+++ b/src/main/java/org/bukkit/entity/Phantom.java
@@ -26,5 +26,19 @@ public interface Phantom extends Flying {
*/
@Nullable
public java.util.UUID getSpawningEntity();
+
+ /**
+ * Check if this phantom will burn in the sunlight
+ *
+ * @return True if phantom will burn in sunlight
+ */
+ public boolean shouldBurnInDay();
+
+ /**
+ * Set if this phantom should burn in the sunlight
+ *
+ * @param shouldBurnInDay True to burn in sunlight
+ */
+ public void setShouldBurnInDay(boolean shouldBurnInDay);
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 01d838a60d056bf4b4a8ef9d0ac18c6f91f412e6..6d515726532ad7417fba9d3e01bcb1167539b23c 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -64,4 +64,19 @@ public interface Skeleton extends AbstractSkeleton {
*/
STRAY;
}
+ // Paper start
+ /**
+ * Check if this skeleton will burn in the sunlight
+ *
+ * @return True if skeleton will burn in sunlight
+ */
+ boolean shouldBurnInDay();
+
+ /**
+ * Set if this skeleton should burn in the sunlight
+ *
+ * @param shouldBurnInDay True to burn in sunlight
+ */
+ void setShouldBurnInDay(boolean shouldBurnInDay);
+ // Paper end
}