diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index ad3aa60d0..c42f596bb 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -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, )"); + 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 {