Paper/Spigot-API-Patches/0182-Mob-Spawner-API-Enhancements.patch
Shane Freeder f8fd607e04
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
bbfd13dd Hyperlink 'Events' in raid event package documentation
b2095bed SPIGOT-5413: Add TrustedPlayer API for foxes
1bf1f3f4 Block trace methods do not require hash sets
abf0cfdc Javadoc improvements per checkstyle
c4a2b425 Add TimeSkipEvent

CraftBukkit Changes:
817116de SPIGOT-5413: Add TrustedPlayer API for foxes
062680a8 SPIGOT-5467: Calm down bees that cannot exit hive
75fac431 SPIGOT-5472: Spurious warning when using clone command on tile entities
85106731 SPIGOT-5471: Allow empty title/author for books
2d9db47f Add TimeSkipEvent
384225c2 Add thread name to TerminalConsoleWriterThread

Spigot Changes:
05bb8bcf Postpone stopping the watchdog until the server is completely stopped
18e2b9be Add package-info.java for Spigot APIs
2019-12-23 02:37:47 +00:00

33 Zeilen
1001 B
Diff

From a648fedca90dbada98f8227d22e0c79faa83e2ca Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 19 Apr 2019 12:41:19 -0500
Subject: [PATCH] Mob Spawner API Enhancements
diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java
index cb447a4a..35a599eb 100644
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
@@ -199,4 +199,18 @@ public interface CreatureSpawner extends TileState {
* @see #getSpawnRange()
*/
public void setSpawnRange(int spawnRange);
+
+ // Paper start
+ /**
+ * Check if spawner is activated (a player is close enough)
+ *
+ * @return True if a player is close enough to activate it
+ */
+ public boolean isActivated();
+
+ /**
+ * Resets the spawn delay timer within the min/max range
+ */
+ public void resetTimer();
+ // Paper end
}
--
2.24.1