Clean up maps on local server
This commit is contained in:
parent
9669e960a7
commit
dedcd254b0
@ -277,12 +277,33 @@ public class WorldGen extends JavaPlugin implements Runnable, Listener
|
||||
|
||||
try
|
||||
{
|
||||
getLogger().info("Uploading " + seed + "!");
|
||||
HttpResponse response = httpClient.execute(request);
|
||||
|
||||
if (response.getStatusLine().getStatusCode() != 200) {
|
||||
if (response.getStatusLine().getStatusCode() != 200)
|
||||
{
|
||||
if (response.getStatusLine().getStatusCode() == 409)
|
||||
{
|
||||
getLogger().warning("Oops - Server rejected " + seed + " because it was already generated");
|
||||
|
||||
if (!outputFile.delete())
|
||||
{
|
||||
getLogger().warning("Could not clean up " + seed);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getLogger().severe("Failed to upload " + seed + ": " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
|
||||
} else {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getLogger().info("Uploaded " + seed + "!");
|
||||
|
||||
if (!outputFile.delete())
|
||||
{
|
||||
getLogger().warning("Could not clean up " + seed);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
|
Loading…
Reference in New Issue
Block a user