diff --git a/src/com/pwn9/PwnPlantGrowth/PlayerListener.java b/src/com/pwn9/PwnPlantGrowth/PlayerListener.java index 6859ad1..3142c1a 100644 --- a/src/com/pwn9/PwnPlantGrowth/PlayerListener.java +++ b/src/com/pwn9/PwnPlantGrowth/PlayerListener.java @@ -34,9 +34,6 @@ public void checkBlockClick(PlayerInteractEvent e) // bail if no item in hand if (!e.hasItem()) return; - // bail if the item is a block - //if (e.isBlockInHand()) return; - // get action Action action = e.getAction(); @@ -47,9 +44,8 @@ public void checkBlockClick(PlayerInteractEvent e) Block block = e.getClickedBlock(); - if (block.getType() == Material.FARMLAND || block.getType() == Material.DIRT || block.getType() == Material.GRASS) + if (block.getType() == Material.FARMLAND || block.getType() == Material.DIRT || block.getType() == Material.GRASS_BLOCK || block.getType() == Material.JUNGLE_LOG || block.getType() == Material.SAND || block.getType() == Material.SOUL_SAND) { - // is this the material in their hand? Material m = e.getMaterial(); if(PwnPlantGrowth.plantTypes.contains(m.toString())) { @@ -61,7 +57,7 @@ else if(PwnPlantGrowth.seedTypes.contains(m.toString())) { String msg = ""; - if (m == Material.BEETROOT_SEEDS) { + if (m == Material.BEETROOT_SEEDS || m == Material.BEETROOT) { int a = PwnPlantGrowth.instance.getConfig().getInt("BEETROOTS.Growth"); msg = "BEETROOT: " + a; } @@ -99,8 +95,6 @@ else if (m == Material.WHEAT_SEEDS) { } } } - - } } \ No newline at end of file diff --git a/src/com/pwn9/PwnPlantGrowth/PwnPlantGrowth.java b/src/com/pwn9/PwnPlantGrowth/PwnPlantGrowth.java index c63ec79..e4d23c5 100644 --- a/src/com/pwn9/PwnPlantGrowth/PwnPlantGrowth.java +++ b/src/com/pwn9/PwnPlantGrowth/PwnPlantGrowth.java @@ -101,7 +101,7 @@ public void onEnable() PwnPlantGrowth.uvFound = " UV found, allowing false light growth."; // Load all possible plant types - String sArray[] = new String[] { "BAMBOO", "BAMBOO_SAPLING", "BEETROOTS", "CACTUS", "CARROTS", "CHORUS_FLOWER", "COCOA", "GRASS", "KELP", "MELON", "MELON_STEM", "NETHER_WART", "POTATOES", "PUMPKIN", "PUMPKIN_STEM", "SUGAR_CANE", "SWEET_BERRY_BUSH", "WEHAT", "ACACIA_SAPLING", "BIRCH_SAPLING", "DARK_OAK_SAPLING", "JUNGLE_SAPLING", "OAK_SAPLING", "SPRUCE_SAPLING", "RED_MUSHROOM", "BROWN_MUSHROOM"}; + String sArray[] = new String[] { "BAMBOO", "BAMBOO_SAPLING", "BEETROOTS", "CACTUS", "CARROTS", "CHORUS_FLOWER", "COCOA", "GRASS", "KELP", "MELON", "MELON_STEM", "NETHER_WART", "POTATOES", "PUMPKIN", "PUMPKIN_STEM", "SUGAR_CANE", "SWEET_BERRY_BUSH", "WHEAT", "ACACIA_SAPLING", "BIRCH_SAPLING", "DARK_OAK_SAPLING", "JUNGLE_SAPLING", "OAK_SAPLING", "SPRUCE_SAPLING", "RED_MUSHROOM", "BROWN_MUSHROOM"}; PwnPlantGrowth.plantTypes = Arrays.asList(sArray); // Load all possible seed types not in plant types, the items that plant a plant