-
Notifications
You must be signed in to change notification settings - Fork 454
Dynmap API
This documentation doesn't contain full api docs for dynmap. You need a fundamental knowledge from java and the general non api usage from the dynmap.
Add the dynmap api as dependency to your maven or gradle project
repositories {
maven { url = "https://repo.mikeprimm.com/" }
}
dependencies {
compileOnly "us.dynmap:DynmapCoreAPI:3.4"
}
<repositories>
<repository>
<id>MikeRepo</id>
<url>https://repo.mikeprimm.com/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>us.dynmap</groupId>
<artifactId>dynmap-api</artifactId>
<version>3.4-beta-3</version>
<scope>provided</scope>
</dependency>
</dependencies>
Use the static method DynmapCommonAPIListener.register
to register an instance of DynmapCommonAPIListener.
The Dynmap plugin or mod will call the method apiEnabled(DynmapCommonAPI api)
when the api becomes enabled.
Link to DynmapCommonAPIListener: https://github.com/webbukkit/dynmap/blob/v3.0/DynmapCoreAPI/src/main/java/org/dynmap/DynmapCommonAPIListener.java
MarkerSet markerAPI = api.getMarkerAPI();
To create a new marker you need a MarkerSet. You can either use an existing MarkerSet or create a new one.
MarkerSet set = markerAPI.createMarkerSet("setId", "Display Name", null, false);
With the MarkerSet instance you can change the attributes. You can hide that set by default, set layer priorities, min and max zoom levels. For a full reference take a look in the MarkerSet interface.
MarkerSet set = markerAPI.getMarkerSet("setId");
MarkerIcon icon = markerAPI.getMarkerIcon("building");
MarkerIcon icon = markerAPI.createMarkerIcon("id", "title", inputStream);
To receive an input stream from a .png file from your plugin you can use
plugin.getResource("myicon.png");
String htmlLabel = "<div>Hello World</div>"
Marker marker = set.createMarker("uniqueMarkerId", htmlLabel, true,
"world", 10, 20, 30, icon, false);
- Base Plugin Settings
- Web Setup
- Storage Setup
- HD Map Configuration
- World and template settings
- Guides
- Advanced Map Configuration
- Component Configuration
- Configuration of worlds
- Exporting World Data in Wavefront OBJ Format
- External Webserver Advanced
- Support for Minecraft Servers other than CraftBukkit
- Support for MinecraftForge based mods
- Support for Tekkit
- Custom Block Definitions
- Model Definition Files
- Texture Definition Files
- Defining a Block using a Custom Block Renderer
- Defining a Block using a Volumetric Model
- Defining a Cuboid Block
- Defining a Simple Block
- Defining Cuboid Models
- Defining Volumetric Models
- Special texture file types
- Using custom block renderers
- Incompatible mods