Merge pull request #8070 from Nightfirecat/fix-ground-markers-bug

ground markers: Fix marking non-marked tiles
This commit is contained in:
Tomas Slusny
2019-03-02 20:40:04 +00:00
committed by GitHub

View File

@@ -314,11 +314,10 @@ public class GroundMarkerPlugin extends Plugin
}
else
{
// Remove any points on the same tile but are of a different color
points.removeIf(p -> p.sameTile(point));
// Add point back only if we are remembering tile colors, otherwise simply remove it
if (config.rememberTileColors())
// Remove any points on the same tile but are of a different color.
// Add a new point if no tile was removed, or if remembering tile colors is enabled, which means the marked
// tile was previously of a different color than the new tile marking.
if (!points.removeIf(p -> p.sameTile(point)) || config.rememberTileColors())
{
points.add(point);
}