2019-05-27 09:13:41 +00:00
|
|
|
From 9c1b7b7e74dce4fb6fbbd9e3979f9cd711e38141 Mon Sep 17 00:00:00 2001
|
2019-04-19 17:41:38 +00:00
|
|
|
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
|
2019-05-06 02:58:04 +00:00
|
|
|
index e73fb0ef..2ff0f24d 100644
|
2019-04-19 17:41:38 +00:00
|
|
|
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java
|
|
|
|
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
|
2019-05-06 02:58:04 +00:00
|
|
|
@@ -199,4 +199,18 @@ public interface CreatureSpawner extends TileState {
|
2019-04-19 17:41:38 +00:00
|
|
|
* @param spawnRange the new spawn range
|
|
|
|
*/
|
|
|
|
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
|
|
|
|
}
|
|
|
|
--
|
2019-04-23 04:47:07 +00:00
|
|
|
2.21.0
|
2019-04-19 17:41:38 +00:00
|
|
|
|