mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-19 17:15:23 +01:00
9a7ca3dbc5
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 564ed152 #482: Add a DragonBattle API to manipulate respawn phases etc 9f2fd967 #474: Add ability to set other plugin names as provided API so others can still depend on it CraftBukkit Changes:fc318cc1
#642: Add a DragonBattle API to manipulate respawn phases etc796eb15a
#644: Fix ChunkMapDistance#removeAllTicketsFor not propagating ticket level updatesa6f80937
SPIGOT-5606: call BlockRedstoneEvent for fence gates Spigot Changes: a03b1fdb Rebuild patches
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
From 0889f7c87d88415878c52224204f17bcf12d4e83 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sun, 7 Oct 2018 00:54:15 -0500
|
|
Subject: [PATCH] Add sun related API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
|
index b7ad4f56..c88f1724 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -1646,6 +1646,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
*/
|
|
public void setFullTime(long time);
|
|
|
|
+ // Paper start
|
|
+
|
|
+ /**
|
|
+ * Check if it is currently daytime in this world
|
|
+ *
|
|
+ * @return True if it is daytime
|
|
+ */
|
|
+ public boolean isDayTime();
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Returns whether the world has an ongoing storm.
|
|
*
|
|
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
|
index b1322878..d726453c 100644
|
|
--- a/src/main/java/org/bukkit/entity/Mob.java
|
|
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
|
@@ -16,6 +16,13 @@ public interface Mob extends LivingEntity, Lootable {
|
|
*/
|
|
@NotNull
|
|
com.destroystokyo.paper.entity.Pathfinder getPathfinder();
|
|
+
|
|
+ /**
|
|
+ * Check if this mob is exposed to daylight
|
|
+ *
|
|
+ * @return True if mob is exposed to daylight
|
|
+ */
|
|
+ boolean isInDaylight();
|
|
// Paper end
|
|
|
|
/**
|
|
--
|
|
2.26.0
|
|
|