mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-10-31 23:59:35 +01:00
Optional support
This commit is contained in:
parent
788604c656
commit
3b5ccc4690
@ -17,8 +17,13 @@ public class AnchorHandler {
|
|||||||
private EpicAnchorsPlugin instance;
|
private EpicAnchorsPlugin instance;
|
||||||
private Map<Location, Integer> delays = new HashMap<>();
|
private Map<Location, Integer> delays = new HashMap<>();
|
||||||
|
|
||||||
|
private boolean epicSpawners;
|
||||||
|
|
||||||
public AnchorHandler(EpicAnchorsPlugin instance) {
|
public AnchorHandler(EpicAnchorsPlugin instance) {
|
||||||
this.instance = instance;
|
this.instance = instance;
|
||||||
|
|
||||||
|
epicSpawners = instance.getServer().getPluginManager().getPlugin("EpicSpawners") != null;
|
||||||
|
|
||||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(instance, this::doAnchorCheck, 0, 20); //ToDo: way to fast.
|
Bukkit.getScheduler().scheduleSyncRepeatingTask(instance, this::doAnchorCheck, 0, 20); //ToDo: way to fast.
|
||||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(instance, this::doParticle, 0, 2); //ToDo: way to fast.
|
Bukkit.getScheduler().scheduleSyncRepeatingTask(instance, this::doParticle, 0, 2); //ToDo: way to fast.
|
||||||
}
|
}
|
||||||
@ -38,8 +43,6 @@ public class AnchorHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean epicSpawners = instance.getServer().getPluginManager().getPlugin("EpicSpawners") != null;
|
|
||||||
|
|
||||||
private void doAnchorCheck() {
|
private void doAnchorCheck() {
|
||||||
for (Anchor anchor : instance.getAnchorManager().getAnchors().values()) {
|
for (Anchor anchor : instance.getAnchorManager().getAnchors().values()) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user