- Renamed markers.csv to markers.txt

- Changed format of markers.txt to colon delimited instead of comma (no need to change anything, plugin will read both types and save in the new format)
- Added support for warps/homes/spawn from data source (either flatfile or mysql)
- Renamed images to be more specific to what they represent (marker = marker.png) for you customizers.
- Added fix to mapUpdate to keep marker/player names from conflicting
This commit is contained in:
fescen9 2010-12-10 06:48:09 +00:00
parent cf2f585364
commit dfbd69f64e
14 changed files with 183 additions and 85 deletions

View file

@ -1,7 +1,11 @@
import java.io.*;
import java.net.*;
import java.util.*;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Socket;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;
public class WebServerRequest extends Thread {
@ -77,14 +81,25 @@ public class WebServerRequest extends Thread {
sb.append(marker.name + " marker " + marker.owner + " " + marker.px + " " + marker.py + " " + marker.pz + "\n");
}
// TODO: Find a way to load the warps from the server. Currently loading the from the flatfile over and over...
ArrayList<Warp> warps = mgr.loadWarps();
List<Warp> warps = mgr.loadWarps();
List<Warp> homes = mgr.loadHomes();
for(Warp warp : warps)
{
sb.append(warp.Name + " warp unknown " + warp.Location.x + " " + warp.Location.y + " " + warp.Location.z + "\n");
Location spawnLocation = etc.getServer().getSpawnLocation();
if (warps != null) {
for(Warp warp : warps) {
sb.append(warp.Name + " warp unknown " + warp.Location.x + " " + warp.Location.y + " " + warp.Location.z + "\n");
}
}
if (homes != null) {
for(Warp warp : homes) {
sb.append(warp.Name + " home " + warp.Name + " " + warp.Location.x + " " + warp.Location.y + " " + warp.Location.z + "\n");
}
}
sb.append("Spawn spawn none " + spawnLocation.x + " " + spawnLocation.y + " " + spawnLocation.z + "\n");
synchronized(mgr.lock) {
for(TileUpdate tu : mgr.tileUpdates) {
if(tu.at >= cutoff) {