Package dev.cerus.maps.api
Class MapScreen
java.lang.Object
dev.cerus.maps.api.MapScreen
Represents an array of clientside maps that form a screen
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionMapScreen(int id, VersionAdapter versionAdapter, int w, int h)
MapScreen(int id, VersionAdapter versionAdapter, int w, int h, ClientsideMap[][] mapArray)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a markervoid
Recalculate the hit box of this screenvoid
Remove all markersvoid
despawnFrames(org.bukkit.entity.Player... players)
Remove the framesvoid
destroyFrames(org.bukkit.entity.Player... players)
int[][]
Frame[][]
int
int
getId()
org.bukkit.Location
int
getWidth()
void
removeMarker(Marker marker)
Remove a markervoid
sendFrames(org.bukkit.entity.Player... players)
Send the frame updates to the playersvoid
sendMaps(boolean full)
Send the map data to all online playersvoid
sendMaps(boolean full, Collection<? extends org.bukkit.entity.Player> players)
Send the map data to the specified playersvoid
sendMaps(boolean full, org.bukkit.entity.Player... players)
Send the map data to the specified playersvoid
sendMarkers(org.bukkit.entity.Player... players)
void
setFrameIds(int[][] frameIds)
Deprecated.void
void
setHitBox(MapScreen.HitBox hitBox)
void
setLocation(org.bukkit.Location location)
void
spawnFrames(org.bukkit.entity.Player... players)
Spawn the framesvoid
useFastGraphics(boolean b)
-
Constructor Details
-
MapScreen
-
MapScreen
-
-
Method Details
-
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 -
sendMaps
public void sendMaps(boolean full)Send the map data to all online players- Parameters:
full
- True if full map data should be sent
-
sendMaps
Send the map data to the specified players- Parameters:
full
- True if full map data should be sentplayers
- The receivers
-
sendMaps
public void sendMaps(boolean full, org.bukkit.entity.Player... players)Send the map data to the specified players- Parameters:
full
- True if full map data should be sentplayers
- The receivers
-
sendMarkers
public void sendMarkers(org.bukkit.entity.Player... players) -
sendFrames
public void sendFrames(org.bukkit.entity.Player... players)Send the frame updates to the players- Parameters:
players
- The receivers
-
spawnFrames
public void spawnFrames(org.bukkit.entity.Player... players)Spawn the frames- Parameters:
players
- The receivers
-
despawnFrames
public void despawnFrames(org.bukkit.entity.Player... players)Remove the frames- Parameters:
players
- The receivers
-
destroyFrames
public void destroyFrames(org.bukkit.entity.Player... players) -
getId
public int getId() -
getWidth
public int getWidth() -
getHeight
public int getHeight() -
useFastGraphics
public void useFastGraphics(boolean b) -
getGraphics
-
getFrames
-
setFrames
-
getFrameIds
public int[][] getFrameIds() -
setFrameIds
Deprecated. -
getMarkers
-
getLocation
public org.bukkit.Location getLocation() -
setLocation
public void setLocation(org.bukkit.Location location) -
calculateHitBox
public void calculateHitBox()Recalculate the hit box of this screen -
getHitBox
-
setHitBox
-