mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-30 17:57:53 +01:00
height parameter for debugroadregen
This commit is contained in:
parent
6944471ad6
commit
0d03e9a1d9
@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.PlotWorld;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.MathMan;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
@CommandDeclaration(
|
||||
@ -54,7 +55,19 @@ public class DebugRoadRegen extends SubCommand {
|
||||
Plot plot = player.getCurrentPlot();
|
||||
if (plot == null) {
|
||||
final ChunkLoc chunk = new ChunkLoc(loc.getX() >> 4, loc.getZ() >> 4);
|
||||
boolean result = HybridUtils.manager.regenerateRoad(world, chunk, 0);
|
||||
int extend = 0;
|
||||
if (args.length == 1) {
|
||||
if (MathMan.isInteger(args[0])) {
|
||||
try {
|
||||
extend = Integer.parseInt(args[0]);
|
||||
}
|
||||
catch (Exception e) {
|
||||
C.NOT_VALID_NUMBER.send(player, "(0, <EXTEND HEIGHT>)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean result = HybridUtils.manager.regenerateRoad(world, chunk, extend);
|
||||
MainUtil.sendMessage(player, "&6Regenerating chunk: " + chunk.x + "," + chunk.z + "\n&6 - Result: " + (result == true ? "&aSuccess" : "&cFailed"));
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user