-
-
Notifications
You must be signed in to change notification settings - Fork 4
Map Screens
Maximilian Dorn edited this page Aug 31, 2022
·
3 revisions
A MapScreen
is basically an array of ClientsideMap
s sitting on item frames.
// Get screen
MapScreen screen = MapScreenRegistry.getScreen(69);
screen.useFastGraphics(true); // Use "FastMapScreenGraphics" instead of "MapScreenGraphics"
// Warning: This will clear the buffer, only call this once
// Get graphics and draw white rect
MapGraphics<?, ?> graphics = screen.getGraphics();
graphics.fillComplete(ColorCache.rgbToMap(255, 0, 0));
graphics.fillRect(5, 5, graphics.getWidth()-10, graphics.getHeight()-10, ColorCache.rgbToMap(255, 255, 255), 1f);
// Send maps to players
Player[] audience = new Player[]{ Bukkit.getPlayer("Notch"), Bukkit.getPlayer("Cerus_") };
screen.spawnFrames(audience); // Spawn item frames
screen.sendMaps(true, audience); // Send maps
- Getting started
- Core classes
- Other
- Examples
- Javadocs
- Concepts
- (Outdated)
"Dirty" maps - (Outdated)
The Advanced Content Change Algorithm
- (Outdated)
- Other
- (Outdated)
Memory usage
- (Outdated)