Paper/patches/api-unmapped/0299-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
2021-06-11 14:02:28 +02: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 1c367f78eadf24850061a84ce63b950b79d3c435..684477b894e52ff33f9fce2edf76e58c292dd75e 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -46,4 +46,19 @@ public interface Skeleton extends Monster, RangedEntity { // Paper
*/
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
}