Skip to content

Commit

Permalink
Merge branch 'los-containers' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Oct 11, 2024
2 parents 91ee057 + 980226f commit 17b6b8a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ac.grim.grimac.checks.impl.scaffolding;

import ac.grim.grimac.api.config.ConfigManager;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.BlockPlaceCheck;
import ac.grim.grimac.player.GrimPlayer;
Expand Down Expand Up @@ -178,12 +179,10 @@ private boolean isBlockTypeWhitelisted(StateType type) {
}

@Override
public void reload() {
super.reload();

useBlockWhitelist = getConfig().getBooleanElse("LineOfSightPlace.use-block-whitelist", false);
public void onReload(ConfigManager config) {
useBlockWhitelist = config.getBooleanElse("LineOfSightPlace.use-block-whitelist", false);
blockWhitelist = new HashSet<>();
List<String> blocks = getConfig().getList("LineOfSightPlace.block-whitelist");
List<String> blocks = config.getStringList("LineOfSightPlace.block-whitelist");
for (String block : blocks) {
blockWhitelist.add(StateTypes.getByName(block));
}
Expand Down

0 comments on commit 17b6b8a

Please sign in to comment.