150151152153154155156157158
public void onBlockFromTo(BlockFromToEvent event) { Block blockFrom = event.getBlock(); Block blockTo = event.getToBlock(); boolean lava = blockFrom.getType() == Material.LAVA || blockFrom.getType() == Material.STATIONARY_LAVA; if (!event.isCancelled() && lava && BBSettings.lavaFlow) { LavaFlow dataBlock = LavaFlowLogger.getFlow(blockFrom, blockTo); dataBlock.send(); } }
28293031323334
} if (bestLocation != null) { player = lavaMap.get(bestLocation); log(blockTo.getLocation(), player); } return new LavaFlow(player, blockFrom.getWorld().getName(), blockTo.getX(), blockTo.getY(), blockTo.getZ(), blockFrom.getTypeId(), (byte) 0); }