mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
fix list (again) and update debugroadregen
This commit is contained in:
parent
15b24b0a00
commit
a32c3067c5
@ -173,11 +173,19 @@ public class PlotSquared {
|
||||
ArrayList<Plot> newPlots = new ArrayList<>();
|
||||
HashMap<PlotId, Plot> worldPlots = PlotSquared.plots.get(priorityWorld);
|
||||
if (worldPlots != null) {
|
||||
newPlots.addAll(sortPlots(worldPlots.values()));
|
||||
for (Plot plot : sortPlots(worldPlots.values())) {
|
||||
if (plots.contains(plot)) {
|
||||
newPlots.add(plot);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Entry<String, HashMap<PlotId, Plot>> entry : PlotSquared.plots.entrySet()) {
|
||||
if (!entry.getKey().equals(priorityWorld)) {
|
||||
entry.getValue().values();
|
||||
for (Plot plot : entry.getValue().values()) {
|
||||
if (plots.contains(plot)) {
|
||||
newPlots.add(plot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return newPlots;
|
||||
@ -504,18 +512,20 @@ public class PlotSquared {
|
||||
// Set chunk
|
||||
ChunkManager.manager = IMP.initChunkManager();
|
||||
// PlotMe
|
||||
TaskManager.runTaskLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (IMP.initPlotMeConverter()) {
|
||||
log("&c=== IMPORTANT ===");
|
||||
log("&cTHIS MESSAGE MAY BE EXTREMELY HELPFUL IF YOU HAVE TROUBLE CONVERTING PLOTME!");
|
||||
log("&c - Make sure 'UUID.read-from-disk' is disabled (false)!");
|
||||
log("&c - Sometimes the database can be locked, deleting PlotMe.jar beforehand will fix the issue!");
|
||||
log("&c - After the conversion is finished, please set 'plotme-convert.enabled' to false in the 'settings.yml@'");
|
||||
if (Settings.CONVERT_PLOTME) {
|
||||
TaskManager.runTaskLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (IMP.initPlotMeConverter()) {
|
||||
log("&c=== IMPORTANT ===");
|
||||
log("&cTHIS MESSAGE MAY BE EXTREMELY HELPFUL IF YOU HAVE TROUBLE CONVERTING PLOTME!");
|
||||
log("&c - Make sure 'UUID.read-from-disk' is disabled (false)!");
|
||||
log("&c - Sometimes the database can be locked, deleting PlotMe.jar beforehand will fix the issue!");
|
||||
log("&c - After the conversion is finished, please set 'plotme-convert.enabled' to false in the 'settings.yml@'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 200);
|
||||
}, 200);
|
||||
}
|
||||
if (Settings.AUTO_CLEAR) {
|
||||
ExpireManager.runTask();
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ public class DebugRoadRegen extends SubCommand {
|
||||
MainUtil.update(loc);
|
||||
}
|
||||
MainUtil.sendMessage(player, "&6Regenerating chunk: " + chunk.x + "," + chunk.z + "\n&6 - Result: " + (result == true ? "&aSuccess" : "&cFailed"));
|
||||
MainUtil.update(loc);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class Home extends SubCommand {
|
||||
MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(id - 1));
|
||||
return true;
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.NO_PLOTS);
|
||||
MainUtil.sendMessage(plr, C.FOUND_NO_PLOTS);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -113,16 +113,19 @@ public class list extends SubCommand {
|
||||
break;
|
||||
}
|
||||
plots = PlotSquared.getPlots(plr);
|
||||
break;
|
||||
}
|
||||
case "shared": {
|
||||
if (plr == null) {
|
||||
break;
|
||||
}
|
||||
plots = new ArrayList<Plot>();
|
||||
for (Plot plot : PlotSquared.getPlots()) {
|
||||
if (plot.helpers.contains(plr.getUUID()) || plot.trusted.contains(plr.getUUID())) {
|
||||
plots.add(plot);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "world": {
|
||||
plots = PlotSquared.getPlots(world).values();
|
||||
@ -185,7 +188,7 @@ public class list extends SubCommand {
|
||||
}
|
||||
|
||||
if (plots.size() == 0) {
|
||||
MainUtil.sendMessage(plr, C.NO_PLOTS);
|
||||
MainUtil.sendMessage(plr, C.FOUND_NO_PLOTS);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user