Added bonus check to prevent loot populator from triggering while disabled.

This commit is contained in:
Auxilor
2021-03-18 20:47:39 +00:00
parent d3df4130c0
commit dc697a266f

View File

@@ -51,6 +51,10 @@ public class LootPopulator extends BlockPopulator {
public void populate(@NotNull final World world,
@NotNull final Random random,
@NotNull final Chunk chunk) {
if (!plugin.getConfigYml().getBool("loot.enabled")) {
return;
}
for (BlockState state : chunk.getTileEntities()) {
Block block = state.getBlock();
if (!(block.getState() instanceof Chest)) {