Closed Naphho closed 2 years ago
This is either outdated or complete miss understanding how the map works.
Marker is re-rendered when its marker options change. There are no equals check between current and previous state. Previous state is thrown away every map update
Circle circle = Marker.circle(Point.of(0, 0), 100);
circle.markerOptions(MarkerOptions.builder().fill(false).build());;
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, () -> {
circle.markerOptions(circle.markerOptions().asBuilder().fill(!circle.markerOptions().fill()).build());
}, 10, 100);
SimpleLayerProvider test = SimpleLayerProvider.builder("test").build();
test.addMarker(Key.of("test"), circle);
Pl3xMapProvider.get().getWorldIfEnabled(Bukkit.getWorld("world").getUID())
.get().layerRegistry().register(Key.of("test"), test);
will result in map toggling on a off marker fill color