It is not possible to update the set of areas, lines, or circles
kdkasad opened this issue ยท 3 comments
Issue Description: Changing the set of a marker is possible, but it is not possible to change the set that a line/area/circle belongs to.
- Dynmap Version: v3.2-SNAPSHOT (latest commit, bc51a14)
- Server Version: Paper 1.16.5 (build 778)
- Pastebin of Configuration.txt: https://gist.github.com/kdkasad/0e82ebae3a158be5efe4be9d6976db41
- Server Host (if applicable): Self-hosted
- Pastebin of crashlogs or other relevant logs: n/a
Steps to Replicate:
- Create a line in the default set (
/dmarker addline "Test Line"
) - Create a new set (
/dmarker addset test
) - Try to update the set of the line (
/dmarker updateline "Test Line" newset:test
) - No errors messages are given, but the line stays in the default set and is not updated.
[x] I have looked at all other issues and this is not a duplicate
[x] I have been able to replicate this
Solutions
The ability to change the set of a marker exists (see issue #1228), but this feature was not implemented for lines/areas/circles. The actual code to perform this update is exactly the same for all 4 marker types.
I have a fix that consists of just copying some code from the processUpdateMarker()
method in DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java
to the processUpdate{Line,Area,Circle}()
methods. However, I haven't opened a PR for it because according to the wiki, any changes to DynmapCore
must be tested on all platforms, which I currently can't do.
Let me know if I should open the PR anyways. In the meantime, here's the patch: https://gist.github.com/kdkasad/bf5df36348cbb07d439482181cbfa4b0