mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +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,6 +512,7 @@ public class PlotSquared {
|
||||
// Set chunk
|
||||
ChunkManager.manager = IMP.initChunkManager();
|
||||
// PlotMe
|
||||
if (Settings.CONVERT_PLOTME) {
|
||||
TaskManager.runTaskLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -516,6 +525,7 @@ public class PlotSquared {
|
||||
}
|
||||
}
|
||||
}, 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