mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
1.13 gen perms
This commit is contained in:
parent
9a990a7d03
commit
6e3dae4a3a
@ -413,20 +413,22 @@ public class Block implements Listener {
|
||||
if (!LocationUtil.isLocationAtLocationRadius(all.getLocation(),
|
||||
island.getLocation(world, IslandEnvironment.Island), island.getRadius())) continue;
|
||||
|
||||
int i = generatorManager.getGeneratorStorage().size() - 1;
|
||||
Generator generator = generatorManager.getGeneratorStorage().get(i);
|
||||
List<Generator> generators = new ArrayList<>(generatorManager.getGenerators());
|
||||
Collections.reverse(generators);
|
||||
for (Generator generator : generators) {
|
||||
|
||||
if (generator.isPermission()) {
|
||||
if (!all.hasPermission(generator.getPermission())
|
||||
&& !all.hasPermission("fabledskyblock.generator.*")
|
||||
&& !all.hasPermission("fabledskyblock.*")) {
|
||||
continue;
|
||||
if (generator.isPermission()) {
|
||||
if (!all.hasPermission(generator.getPermission())
|
||||
&& !all.hasPermission("fabledskyblock.generator.*")
|
||||
&& !all.hasPermission("fabledskyblock.*")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
generatorManager.generateBlock(generator, block);
|
||||
return;
|
||||
event.setCancelled(true);
|
||||
generatorManager.generateBlock(generator, block);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user