Fix console errors when generator is disabled

This commit is contained in:
SirBlobman 2019-10-15 18:20:18 +00:00
parent 566038b3f3
commit 80d4d9165f

View File

@ -506,9 +506,10 @@ public class Block implements Listener {
return;
GeneratorManager generatorManager = skyblock.getGeneratorManager();
if(generatorManager == null) return;
List<Generator> generators = Lists.newArrayList(generatorManager.getGenerators());
if (generatorManager == null || generators.size() == 0)
return;
if(generators == null || generators.isEmpty()) return;
Collections.reverse(generators); // Use the highest generator available
// Filter valid players on the island.