Package dev.cerus.maps.api
Class ClientsideMap
java.lang.Object
dev.cerus.maps.api.ClientsideMap
A map that is completely clientside
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a markervoid
Remove all markersvoid
draw(MapGraphics<ClientsideMap,?> graphics)
Draw a graphics buffer onto this mapbyte[]
getData()
int
int
getId()
int
getWidth()
int
getX()
int
getY()
boolean
void
removeMarker(Marker marker)
Remove a markervoid
sendTo(VersionAdapter versionAdapter, boolean ignoreBounds, org.bukkit.entity.Player player)
Send this map to a playervoid
sendTo(VersionAdapter versionAdapter, org.bukkit.entity.Player player)
Send this map to a playervoid
setDirtyMarkers(boolean dirtyMarkers)
void
setHeight(int height)
void
setWidth(int width)
void
setX(int x)
void
setY(int y)
-
Constructor Details
-
ClientsideMap
public ClientsideMap() -
ClientsideMap
public ClientsideMap(int id)
-
-
Method Details
-
sendTo
Send this map to a player- Parameters:
versionAdapter
- The version adapterplayer
- The player
-
sendTo
public void sendTo(VersionAdapter versionAdapter, boolean ignoreBounds, org.bukkit.entity.Player player)Send this map to a player- Parameters:
versionAdapter
- The version adapterignoreBounds
- True if the whole map should be sentplayer
- The player
-
draw
Draw a graphics buffer onto this map- Parameters:
graphics
- The buffer
-
addMarker
Add a marker- Parameters:
marker
- The marker to add
-
removeMarker
Remove a marker- Parameters:
marker
- The marker to remove
-
clearMarkers
public void clearMarkers()Remove all markers -
getId
public int getId() -
getData
public byte[] getData() -
getX
public int getX() -
setX
public void setX(int x) -
getY
public int getY() -
setY
public void setY(int y) -
getWidth
public int getWidth() -
setWidth
public void setWidth(int width) -
getHeight
public int getHeight() -
setHeight
public void setHeight(int height) -
getMarkers
-
hasDirtyMarkers
public boolean hasDirtyMarkers() -
setDirtyMarkers
public void setDirtyMarkers(boolean dirtyMarkers)
-