This commit is contained in:
boy0001 2015-09-01 09:55:14 +10:00
parent 29da0da8bb
commit 6671fd7e6d
4 changed files with 27 additions and 13 deletions

View File

@ -88,7 +88,7 @@ public class Clear extends SubCommand {
MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER); MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER);
return false; return false;
} }
if (FlagManager.isPlotFlagTrue(plot, "done" ) && (!Permissions.hasPermission(plr, "plots.continue") || (Settings.DONE_COUNTS_TOWARDS_LIMIT && MainUtil.getAllowedPlots(plr) >= MainUtil.getPlayerPlotCount(plr)))) { if (FlagManager.getPlotFlag(plot, "done") != null && (!Permissions.hasPermission(plr, "plots.continue") || (Settings.DONE_COUNTS_TOWARDS_LIMIT && MainUtil.getAllowedPlots(plr) >= MainUtil.getPlayerPlotCount(plr)))) {
MainUtil.sendMessage(plr, C.DONE_ALREADY_DONE); MainUtil.sendMessage(plr, C.DONE_ALREADY_DONE);
return false; return false;
} }

View File

@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.Set; import java.util.Set;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -244,9 +245,11 @@ public class LikePlotMeConverter {
} }
sendMessage("Creating plot DB"); sendMessage("Creating plot DB");
Thread.sleep(1000); Thread.sleep(1000);
final AtomicBoolean done = new AtomicBoolean(false);
DBFunc.createPlotsAndData(createdPlots, new Runnable() { DBFunc.createPlotsAndData(createdPlots, new Runnable() {
@Override @Override
public void run() { public void run() {
if (done.get()) {
sendMessage("&aDatabase conversion is now complete!"); sendMessage("&aDatabase conversion is now complete!");
PS.debug("&c - Stop the server"); PS.debug("&c - Stop the server");
PS.debug("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml"); PS.debug("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
@ -254,6 +257,11 @@ public class LikePlotMeConverter {
PS.debug("&c - Start the server"); PS.debug("&c - Start the server");
PS.get().setAllPlotsRaw(DBFunc.getPlots()); PS.get().setAllPlotsRaw(DBFunc.getPlots());
} }
else {
sendMessage("&cPlease wait until database conversion is complete. You will be notified with instructions when this happens!");
done.set(true);
}
}
}); });
sendMessage("Saving configuration..."); sendMessage("Saving configuration...");
try { try {
@ -311,7 +319,17 @@ public class LikePlotMeConverter {
} catch (final Exception e) { } catch (final Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (done.get()) {
sendMessage("&aDatabase conversion is now complete!");
PS.debug("&c - Stop the server");
PS.debug("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
PS.debug("&c - Correct any generator settings that haven't copied to 'settings.yml' properly");
PS.debug("&c - Start the server");
}
else {
sendMessage("&cPlease wait until database conversion is complete. You will be notified with instructions when this happens!"); sendMessage("&cPlease wait until database conversion is complete. You will be notified with instructions when this happens!");
done.set(true);
}
} }
}); });
} catch (final Exception e) { } catch (final Exception e) {

View File

@ -72,10 +72,6 @@ public class WESubscriber {
event.setExtent(new NullExtent()); event.setExtent(new NullExtent());
} }
return; return;
}
HeightLimitExtent heightLimit = null;
if (plotworld != null) {
} }
if (Settings.CHUNK_PROCESSOR) { if (Settings.CHUNK_PROCESSOR) {
if (Settings.EXPERIMENTAL_FAST_ASYNC_WORLDEDIT) { if (Settings.EXPERIMENTAL_FAST_ASYNC_WORLDEDIT) {

View File

@ -124,7 +124,7 @@ public class SendChunk {
@Override @Override
public void run() { public void run() {
try { try {
chunk.unload(true, true); chunk.unload(true, false);
} }
catch (Exception e) { catch (Exception e) {
String worldname = chunk.getWorld().getName(); String worldname = chunk.getWorld().getName();