Skip to content

Clientside Maps

Maximilian Dorn edited this page Aug 30, 2022 · 2 revisions

Clientside Maps

A ClientsideMap is a fully clientside map. It does not affect any "real" serverside maps. You can draw whatever you want on a ClientsideMap.

Usage

// Get a new version adapter
VersionAdapter va = new VersionAdapterFactory().makeAdapter();

// Create a new map and draw a red rectangle
ClientsideMap map = new ClientsideMap();
ClientsideMapGraphics graphics = new ClientsideMapGraphics();
graphics.fillComplete(ColorCache.rgbToMap(255, 255, 255));
graphics.fillRect(5, 5, 118, 118, ColorCache.rgbToMap(255, 0, 0), 1f);

// Draw the buffer onto the map and send the map to Notch
map.draw(graphics);
map.sendTo(va, Bukkit.getPlayer("Notch"));