mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-27 17:37:34 +01:00
Fixed tree/mushroom growth not respecting config file when using bonemeal (...)
Fixed mushroom growth logging invalid data when using bonemeal
This commit is contained in:
parent
f2934fd876
commit
4b9e69c40f
@ -1,6 +1,7 @@
|
|||||||
package net.coreprotect.listener.block;
|
package net.coreprotect.listener.block;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Tag;
|
import org.bukkit.Tag;
|
||||||
@ -30,7 +31,10 @@ public final class BlockFertilizeListener extends Queue implements Listener {
|
|||||||
|
|
||||||
Location location = block.getLocation();
|
Location location = block.getLocation();
|
||||||
List<BlockState> blocks = event.getBlocks();
|
List<BlockState> blocks = event.getBlocks();
|
||||||
if (blocks.size() == 1 && blocks.get(0).getLocation().equals(location) && Tag.SAPLINGS.isTagged(block.getType())) {
|
if (Tag.SAPLINGS.isTagged(block.getType()) && (!Config.getConfig(location.getWorld()).TREE_GROWTH || (blocks.size() == 1 && blocks.get(0).getLocation().equals(location)))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (block.getType().name().toLowerCase(Locale.ROOT).contains("mushroom") && (!Config.getConfig(location.getWorld()).MUSHROOM_GROWTH || (blocks.size() == 1 && blocks.get(0).getLocation().equals(location)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user