From 5cad56e43674b56de84974e6f63ad9dfabcf0b72 Mon Sep 17 00:00:00 2001 From: Esophose Date: Wed, 6 Feb 2019 20:25:59 -0700 Subject: [PATCH] Minor clean up --- .../java/com/songoda/ultimatetimber/treefall/CustomLoot.java | 2 +- .../java/com/songoda/ultimatetimber/treefall/TreeReplant.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }