Creating a map

Creating a canvas

Returns a canvas object that can be used to create and manipulate a map, which can later be retrieved as a game map object.

[new|empty] drawing map

When creating a map in a folder /skcrew/maps/, a map image file will be created. The file name will match the ID of the game map.

Getting a canvas by map ID

[drawing] map (by|with) id %number%

Getting an item from the canvas

Accepts a canvas object as an argument, which represents a drawable map surface, and returns a game map item that can be used in the game.

[the] map item (from|of) %map%

Getting a canvas from an object

Accepts a map item (of type ItemStack) as an argument, which represents a game map item, and returns a canvas object that can be used for drawing and manipulating the map’s visual content.

[drawing] map (of|from) item %itemstack%

Forced saving of the canvas

save map %map%

Maps are not automatically loaded. To prevent them from disappearing, store the canvases of these maps in global variables.

The addon supports automatic serialization of data associated with canvases.