Respect LAVAFLOW config setting in all cases

Fixes #648
This commit is contained in:
Brokkonaut
2018-08-01 02:53:49 +02:00
parent dd58019be1
commit 8084b3e4c0
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ public class LogBlock extends JavaPlugin {
if (isLogging(Logging.BLOCKPLACE)) {
pm.registerEvents(new BlockPlaceLogging(this), this);
}
if (isLogging(Logging.BLOCKPLACE) || isLogging(Logging.LAVAFLOW) || isLogging(Logging.WATERFLOW)) {
if (isLogging(Logging.LAVAFLOW) || isLogging(Logging.WATERFLOW)) {
pm.registerEvents(new FluidFlowLogging(this), this);
}
if (isLogging(Logging.BLOCKBREAK)) {

View File

@ -33,9 +33,9 @@ public class FluidFlowLogging extends LoggingListener {
final Block to = event.getToBlock();
final Material typeTo = to.getType();
final boolean canFlow = BukkitUtils.isEmpty(typeTo) || BukkitUtils.getNonFluidProofBlocks().contains(typeTo);
if (typeFrom == Material.LAVA) {
if (typeFrom == Material.LAVA && wcfg.isLogging(Logging.LAVAFLOW)) {
Levelled levelledFrom = (Levelled)blockDataFrom;
if (canFlow && wcfg.isLogging(Logging.LAVAFLOW)) {
if (canFlow) {
if (isSurroundedByWater(to) && levelledFrom.getLevel() <= 2) {
consumer.queueBlockReplace(new Actor("LavaFlow"), to.getState(), Material.COBBLESTONE.createBlockData());
} else {