summaryrefslogtreecommitdiff
path: root/tools/tmwcon/src/converter/WLKInterface.java
blob: b9e0cb20640c53500fdc60df6fa7e62ba7fd00b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * TMWServ to eAthena Converter (c) 2008 Jared Adams
 * License: GPL, v2 or later
 */

package converter;

import java.io.*;

import tiled.core.*;
import tiled.plugins.tmw.*;

public class WLKInterface {
    public WLKInterface() {
        // See if the writer is available
        WLKWriter.class.getName();
    }

    public void write(String name, Map map, File wlk) {
        try {
            wlk.createNewFile();
            WLKWriter.writeMap(map, new FileOutputStream(wlk));
            System.out.println("WLK written");
        } catch (Exception e) {
            System.out.println("Prolem writing WLK file:");
            e.printStackTrace();
        }
    }
}