Added prefix to flatmap.

This commit is contained in:
FrozenCow 2011-03-06 14:45:26 +01:00
parent 090f417f32
commit f3c90f0aae
2 changed files with 9 additions and 4 deletions

View file

@ -18,9 +18,11 @@ import org.dynmap.MapType;
import org.dynmap.debug.Debug;
public class FlatMap extends MapType {
private String prefix;
private ColorScheme colorScheme;
public FlatMap(Map<String, Object> configuration) {
prefix = (String)configuration.get("prefix");
colorScheme = ColorScheme.getScheme((String)configuration.get("colorscheme"));
}
@ -100,13 +102,14 @@ public class FlatMap extends MapType {
}
public static class FlatMapTile extends MapTile {
FlatMap map;
public int x;
public int y;
public int size;
public FlatMapTile(World world, FlatMap map, int x, int y, int size) {
super(world, map);
this.map = map;
this.x = x;
this.y = y;
this.size = size;
@ -114,7 +117,7 @@ public class FlatMap extends MapType {
@Override
public String getFilename() {
return "flat_" + size + "_" + x + "_" + y + ".png";
return map.prefix + "_" + size + "_" + x + "_" + y + ".png";
}
}
}