diff --git a/src/main/java/com/songoda/ultimatetimber/treefall/CustomLoot.java b/src/main/java/com/songoda/ultimatetimber/treefall/CustomLoot.java index b0bad41..1da233b 100644 --- a/src/main/java/com/songoda/ultimatetimber/treefall/CustomLoot.java +++ b/src/main/java/com/songoda/ultimatetimber/treefall/CustomLoot.java @@ -35,7 +35,7 @@ public class CustomLoot { FileConfiguration fileConfiguration = UltimateTimber.getInstance().getConfig(); - List arrayList = (List) fileConfiguration.getList(DefaultConfig.CUSTOM_LOOT_LIST); + List arrayList = fileConfiguration.getStringList(DefaultConfig.CUSTOM_LOOT_LIST); for (String string : arrayList) { diff --git a/src/main/java/com/songoda/ultimatetimber/treefall/TreeReplant.java b/src/main/java/com/songoda/ultimatetimber/treefall/TreeReplant.java index 60febf3..af0d485 100644 --- a/src/main/java/com/songoda/ultimatetimber/treefall/TreeReplant.java +++ b/src/main/java/com/songoda/ultimatetimber/treefall/TreeReplant.java @@ -28,8 +28,8 @@ class TreeReplant { return; } - if (!block.getLocation().clone().subtract(new Vector(0, 1, 0)).getBlock().getType().equals(Material.DIRT) && - !block.getLocation().clone().subtract(new Vector(0, 1, 0)).getBlock().getType().equals(Material.COARSE_DIRT) && !block.getLocation().clone().subtract(new Vector(0, 1, 0)).getBlock().getType().equals(Material.PODZOL)) { + Material belowBlockType = block.getLocation().clone().subtract(new Vector(0, 1, 0)).getBlock().getType(); + if (!belowBlockType.equals(Material.DIRT) && !belowBlockType.equals(Material.COARSE_DIRT) && !belowBlockType.equals(Material.PODZOL)) { block.setType(Material.AIR); return; }