Add API for other plugins to trigger map renders due to updated volumes

This commit is contained in:
Mike Primm 2011-10-22 17:05:21 -05:00
parent 23ba798951
commit 2338c48f02
2 changed files with 28 additions and 0 deletions

View file

@ -1306,6 +1306,24 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
}
return false;
}
/**
* Trigger update on tiles associated with given locations. If two locations provided,
* the volume is the rectangular prism ("cuboid") with the two locations on opposite corners.
*
* @param l0 - first location (required)
* @param l1 - second location (if null, only single point invalidated (l0))
* @return number of tiles queued to be rerendered
*/
public int triggerRenderOfVolume(Location l0, Location l1) {
if(mapManager != null) {
if(l1 == null)
return mapManager.touch(l0);
else
return mapManager.touchVolume(l0, l1);
}
return 0;
}
/**
* Register markers API - used by component to supply marker API to plugin
*/