Mob Spawner API Enhancements
This commit is contained in:
parent
90d8377b59
commit
f6a78c9715
2 changed files with 120 additions and 0 deletions
32
Spigot-API-Patches/0183-Mob-Spawner-API-Enhancements.patch
Normal file
32
Spigot-API-Patches/0183-Mob-Spawner-API-Enhancements.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
From 73ceb55852feb2fc177ed6e70cb0b2846033b89f 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 5773e99e..31c5a006 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 BlockState {
|
||||
* @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
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue