Skip to content

Version 2.0.0

Choose a tag to compare

@1Thillo 1Thillo released this 03 Sep 20:50
· 10 commits to master since this release
0cb35b6

First release of the fork. Requires Paper 26.2 or newer and Java 25.

The plugin no longer holds images in memory, no longer loads every map during startup, and the item frame properties are now changed with a command instead of a wooden hoe.

Memory

Previous versions kept every source image decoded in a cache that was never emptied, and each renderer additionally held a getSubimage() view of its source, which pins the parent image even when the cache is cleared. Memory scaled with the total resolution of everything placed and could not be reclaimed.

Images are now converted to map colours once and stored on disk as one 16 KiB file per map under plugins/ImageMaps/cache. A renderer holds no image data: it requests its tile asynchronously on the first render, draws it on the next one and drops the reference again.

before after
plugin memory when idle every source image, decoded none
server memory per map 48 KiB from server start 16 KiB, once someone looks at it
startup one map load and image decode per entry, main thread reads maps.yml
per tick render() work per map nothing after the first draw

Maps get their renderer from MapInitializeEvent now, so a map costs nothing until a player comes close enough to see it.

Paper 26.2

  • builds against io.papermc.paper:paper-api, Java 25, api-version: 26.2
  • messaging moved from the BungeeCord chat API, which the Paper API no longer ships, to Adventure
  • dropped the CLCore dependency. It lived in an authenticated GitHub Packages repository, which is why the project could not be built by anyone but its author. The jar now has no shaded dependencies at all
  • removed the server version checks. They compared the minor version against 14, 16 and 17, so on 26.2 they reported invisible frames, glowing frames, floor placement and tracking control as unsupported

Item frames

The wooden hoe is gone. A plain right click on a frame is answered by the client with an interaction on the block behind it, so the server was never told about it, and a frame set to fixed refused every further interaction, which made that change impossible to undo with the same item.

/imagemap frame invisible true     hides the frames, leaving only the image
/imagemap frame fixed true         locks the frames against breaking and modification
/imagemap frame rotatable true     allows players to rotate the individual maps again

Each applies to every frame of the image you are looking at.

Placed images no longer rotate by default. Rotating one tile of a multi map image tears a hole into it that can only be repaired by placing the image again, and vanilla let anyone do that with an empty hand. rotatable gives it back per image and survives restarts.

Permissions

One node per sub command. imagemaps.help and imagemaps.frame (with .invisible, .fixed and .rotatable) default to everyone, everything else to op. imagemaps.admin, imagemaps.toggleFixed and imagemaps.toggleVisible are gone.

Upgrading

Existing images keep working, there is nothing to convert by hand. maps.yml is read as before and the item frames already in your world stay as they are. The first look at an image after the upgrade converts it and fills the cache; /imagemap bake does that up front. Deleting the cache folder is always safe.

Two things to check: reload now uses imagemaps.reload rather than imagemap.reload, which never matched the permission the plugin registered, and any LuckPerms setup referencing the three removed nodes needs updating. config.yml is obsolete and ignored.

Also fixed

  • images no longer stay blank until a player rejoins, drawing happens inside render() rather than from a delayed task
  • image resolutions are read from the file header instead of decoding the whole image
  • image file names resolve ignoring case, and names with spaces work when quoted
  • /imagemap list defaulted to page 0
  • /imagemap bake added

Based on SydMontague/ImageMaps 1.0.11, MIT licensed.