mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fixes #582
This commit is contained in:
parent
29da0da8bb
commit
6671fd7e6d
@ -88,7 +88,7 @@ public class Clear extends SubCommand {
|
||||
MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER);
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -244,9 +245,11 @@ public class LikePlotMeConverter {
|
||||
}
|
||||
sendMessage("Creating plot DB");
|
||||
Thread.sleep(1000);
|
||||
final AtomicBoolean done = new AtomicBoolean(false);
|
||||
DBFunc.createPlotsAndData(createdPlots, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
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");
|
||||
@ -254,6 +257,11 @@ public class LikePlotMeConverter {
|
||||
PS.debug("&c - Start the server");
|
||||
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...");
|
||||
try {
|
||||
@ -311,7 +319,17 @@ public class LikePlotMeConverter {
|
||||
} catch (final Exception e) {
|
||||
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!");
|
||||
done.set(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (final Exception e) {
|
||||
|
@ -72,10 +72,6 @@ public class WESubscriber {
|
||||
event.setExtent(new NullExtent());
|
||||
}
|
||||
return;
|
||||
}
|
||||
HeightLimitExtent heightLimit = null;
|
||||
if (plotworld != null) {
|
||||
|
||||
}
|
||||
if (Settings.CHUNK_PROCESSOR) {
|
||||
if (Settings.EXPERIMENTAL_FAST_ASYNC_WORLDEDIT) {
|
||||
|
@ -124,7 +124,7 @@ public class SendChunk {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
chunk.unload(true, true);
|
||||
chunk.unload(true, false);
|
||||
}
|
||||
catch (Exception e) {
|
||||
String worldname = chunk.getWorld().getName();
|
||||
|
Loading…
Reference in New Issue
Block a user