Merge branch 'development' into 'development'

Fix console errors when generator is disabled

See merge request Songoda/fabledskyblock!30
This commit is contained in:
Brianna O'Keefe 2019-10-17 03:14:37 +00:00
commit 27b0213400

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.