map.setWorld(reset.getWorld());
}
}
}
else {
DenizenMapRenderer dmr = null;
List<MapRenderer> oldRendererList = map.getRenderers();
for (MapRenderer renderer : oldRendererList) {
if (!(renderer instanceof DenizenMapRenderer) || dmr != null)
map.removeRenderer(renderer);
else
dmr = (DenizenMapRenderer) renderer;
}
if (dmr == null) {
dmr = new DenizenMapRenderer(oldRendererList);
map.addRenderer(dmr);
}
if (image != null)
dmr.addImage(x.asInt(), y.asInt(), new File(DenizenAPI.getCurrentInstance().getDataFolder(),
image.asString()).getPath(), resize.asBoolean());
else if (text != null)
dmr.addText(x.asInt(), y.asInt(), text.asString());
}
}