mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-28 17:38:01 +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);
|
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;
|
||||||
}
|
}
|
||||||
|
@ -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,15 +245,22 @@ 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() {
|
||||||
sendMessage("&aDatabase conversion is now complete!");
|
if (done.get()) {
|
||||||
PS.debug("&c - Stop the server");
|
sendMessage("&aDatabase conversion is now complete!");
|
||||||
PS.debug("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
|
PS.debug("&c - Stop the server");
|
||||||
PS.debug("&c - Correct any generator settings that haven't copied to 'settings.yml' properly");
|
PS.debug("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
|
||||||
PS.debug("&c - Start the server");
|
PS.debug("&c - Correct any generator settings that haven't copied to 'settings.yml' properly");
|
||||||
PS.get().setAllPlotsRaw(DBFunc.getPlots());
|
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...");
|
sendMessage("Saving configuration...");
|
||||||
@ -311,7 +319,17 @@ public class LikePlotMeConverter {
|
|||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
sendMessage("&cPlease wait until database conversion is complete. You will be notified with instructions when this happens!");
|
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) {
|
} catch (final Exception e) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user