mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-10-31 23:59:35 +01:00
Don't throw errors without EpicSpawners installed.
This commit is contained in:
parent
1535fd3cb8
commit
fcf46f09f0
@ -6,7 +6,6 @@ import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.epicanchors.EpicAnchors;
|
||||
import com.songoda.epicanchors.anchor.Anchor;
|
||||
import com.songoda.epicanchors.settings.Settings;
|
||||
import com.songoda.epicspawners.EpicSpawners;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -122,9 +121,9 @@ public class AnchorTask extends BukkitRunnable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!epicSpawners || EpicSpawners.getInstance().getSpawnerManager() == null) continue;
|
||||
if (!epicSpawners || com.songoda.epicspawners.EpicSpawners.getInstance().getSpawnerManager() == null) continue;
|
||||
|
||||
EpicSpawners.getInstance().getSpawnerManager().getSpawners().stream()
|
||||
com.songoda.epicspawners.EpicSpawners.getInstance().getSpawnerManager().getSpawners().stream()
|
||||
.filter(spawner -> spawner.getWorld().isChunkLoaded(spawner.getX() >> 4, spawner.getZ() >> 4)
|
||||
&& chunk == spawner.getLocation().getChunk()).forEach(spawner -> {
|
||||
Block block = spawner.getLocation().getBlock();
|
||||
|
Loading…
Reference in New Issue
Block a user