-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathBukkitSpawnerBlockProvider.java
More file actions
29 lines (25 loc) · 925 Bytes
/
BukkitSpawnerBlockProvider.java
File metadata and controls
29 lines (25 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package net.ess3.provider.providers;
import net.ess3.provider.SpawnerBlockProvider;
import net.essentialsx.providers.ProviderData;
import net.essentialsx.providers.ProviderTest;
import org.bukkit.block.CreatureSpawner;
@ProviderData(description = "1.12+ Spawner Block Provider", weight = 1)
public class BukkitSpawnerBlockProvider implements SpawnerBlockProvider {
@Override
public void setMaxSpawnDelay(final CreatureSpawner spawner, final int delay) {
spawner.setMaxSpawnDelay(delay);
}
@Override
public void setMinSpawnDelay(final CreatureSpawner spawner, final int delay) {
spawner.setMinSpawnDelay(delay);
}
@ProviderTest
public static boolean test() {
try {
CreatureSpawner.class.getMethod("setMaxSpawnDelay", int.class);
return true;
} catch (final NoSuchMethodException ignored) {
return false;
}
}
}