mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 16:46:45 +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.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.object.PlotWorld;
|
import com.intellectualcrafters.plot.object.PlotWorld;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
|
import com.intellectualcrafters.plot.util.MathMan;
|
||||||
import com.plotsquared.general.commands.CommandDeclaration;
|
import com.plotsquared.general.commands.CommandDeclaration;
|
||||||
|
|
||||||
@CommandDeclaration(
|
@CommandDeclaration(
|
||||||
@ -54,7 +55,19 @@ public class DebugRoadRegen extends SubCommand {
|
|||||||
Plot plot = player.getCurrentPlot();
|
Plot plot = player.getCurrentPlot();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
final ChunkLoc chunk = new ChunkLoc(loc.getX() >> 4, loc.getZ() >> 4);
|
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"));
|
MainUtil.sendMessage(player, "&6Regenerating chunk: " + chunk.x + "," + chunk.z + "\n&6 - Result: " + (result == true ? "&aSuccess" : "&cFailed"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user