blob: da60c688e4e4330d8d267c33345ef88cce131074 (
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
30
31
|
//
package converter;
import java.io.*;
import tiled.core.*;
import tiled.plugins.tmw.*;
public class WLKInterface {
private File folder;
public WLKInterface(File folder) {
WLKWriter.class.getName();
this.folder = folder;
File f = new File("server-data/data");
f.mkdirs();
}
public void write(String name, Map map) {
File wlk = new File(folder, name + ".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();
}
}
}
|