private IMaterialDistributionSettings currentDistributionSettingsProvider(IGraphicsGrid grid, ShortPoint2D position) { if (currentTab != null) { if (grid.getPlayerIdAt(position.x, position.y) >= 0) { return grid.getPartitionData(position.x, position.y).getPartitionSettings().getDistributionSettings(currentTab.materialButton.getMaterial()); } } return null; }