Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-API-Patches/0182-Mob-Spawner-API-Enhancements.patch

33 Zeilen
1003 B
Diff

From f8f78c28755f27cccab9be2d2ba6000ee6016e2a Mon Sep 17 00:00:00 2001
2019-04-19 19:41:38 +02: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
index cb447a4ad..35a599ebe 100644
2019-04-19 19:41:38 +02:00
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
2019-05-06 04:58:04 +02:00
@@ -199,4 +199,18 @@ public interface CreatureSpawner extends TileState {
* @see #getSpawnRange()
2019-04-19 19:41:38 +02:00
*/
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.25.1
2019-04-19 19:41:38 +02:00