This commit is contained in:
boy0001 2015-02-22 18:30:39 +11:00
parent 42aeb1479d
commit d62841de3e
2 changed files with 5 additions and 10 deletions

View File

@ -28,7 +28,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler;
@SuppressWarnings({ "unused", "deprecated", "javadoc" })
public class Rate extends SubCommand { public class Rate extends SubCommand {
/* /*
* String cmd, String permission, String description, String usage, String * String cmd, String permission, String description, String usage, String

View File

@ -20,18 +20,16 @@
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands; package com.intellectualcrafters.plot.commands;
import java.util.ArrayList; import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.World;
import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotManager;
import com.intellectualcrafters.plot.generator.HybridUtils;
import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotManager;
import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.bukkit.ChunkManager; import com.intellectualcrafters.plot.util.AChunkManager;
public class RegenAllRoads extends SubCommand { public class RegenAllRoads extends SubCommand {
public RegenAllRoads() { public RegenAllRoads() {
@ -54,14 +52,12 @@ public class RegenAllRoads extends SubCommand {
sendMessage(player, C.NOT_VALID_PLOT_WORLD); sendMessage(player, C.NOT_VALID_PLOT_WORLD);
return false; return false;
} }
final HybridPlotManager hpm = (HybridPlotManager) manager; final List<ChunkLoc> chunks = AChunkManager.manager.getChunkChunks(name);
final World world = Bukkit.getWorld(name);
final ArrayList<ChunkLoc> chunks = ChunkManager.getChunkChunks(world);
PlotSquared.log("&cIf no schematic is set, the following will not do anything"); PlotSquared.log("&cIf no schematic is set, the following will not do anything");
PlotSquared.log("&7 - To set a schematic, stand in a plot and use &c/plot createroadschematic"); PlotSquared.log("&7 - To set a schematic, stand in a plot and use &c/plot createroadschematic");
PlotSquared.log("&6Potential chunks to update: &7" + (chunks.size() * 1024)); PlotSquared.log("&6Potential chunks to update: &7" + (chunks.size() * 1024));
PlotSquared.log("&6Estimated time: &7" + (chunks.size()) + " seconds"); PlotSquared.log("&6Estimated time: &7" + (chunks.size()) + " seconds");
final boolean result = hpm.scheduleRoadUpdate(world); final boolean result = HybridUtils.manager.scheduleRoadUpdate(name);
if (!result) { if (!result) {
PlotSquared.log("&cCannot schedule mass schematic update! (Is one already in progress?)"); PlotSquared.log("&cCannot schedule mass schematic update! (Is one already in progress?)");
return false; return false;