Fixed exceptions in //brush since build #115.

Dieser Commit ist enthalten in:
TomyLobo 2011-08-08 02:22:29 +02:00
Ursprung b8a987b204
Commit 8d688165ee

Datei anzeigen

@ -82,7 +82,7 @@ public class BrushCommands {
tool.setBrush(new SphereBrush(), "worldedit.brush.sphere"); tool.setBrush(new SphereBrush(), "worldedit.brush.sphere");
} }
player.print(String.format("Sphere brush shape equipped (%d).", player.print(String.format("Sphere brush shape equipped (%.0f).",
radius)); radius));
} }
@ -126,7 +126,7 @@ public class BrushCommands {
tool.setBrush(new CylinderBrush(height), "worldedit.brush.cylinder"); tool.setBrush(new CylinderBrush(height), "worldedit.brush.cylinder");
} }
player.print(String.format("Cylinder brush shape equipped (%d by %d).", player.print(String.format("Cylinder brush shape equipped (%.0f by %d).",
radius, height)); radius, height));
} }
@ -182,7 +182,7 @@ public class BrushCommands {
LocalConfiguration config = we.getConfiguration(); LocalConfiguration config = we.getConfiguration();
double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; double radius = args.argsLength() > 0 ? args.getDouble(0) : 2;
if (radius > config.maxBrushRadius) { if (radius > config.maxBrushRadius) {
player.printError("Maximum allowed brush radius: " player.printError("Maximum allowed brush radius: "
+ config.maxBrushRadius); + config.maxBrushRadius);
@ -195,7 +195,7 @@ public class BrushCommands {
tool.setSize(radius); tool.setSize(radius);
tool.setBrush(new SmoothBrush(iterations), "worldedit.brush.smooth"); tool.setBrush(new SmoothBrush(iterations), "worldedit.brush.smooth");
player.print(String.format("Smooth brush equipped (%d x %dx).", player.print(String.format("Smooth brush equipped (%.0f x %dx).",
radius, iterations)); radius, iterations));
} }
@ -213,7 +213,7 @@ public class BrushCommands {
LocalConfiguration config = we.getConfiguration(); LocalConfiguration config = we.getConfiguration();
double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; double radius = args.argsLength() > 1 ? args.getDouble(1) : 5;
if (radius > config.maxBrushRadius) { if (radius > config.maxBrushRadius) {
player.printError("Maximum allowed brush radius: " player.printError("Maximum allowed brush radius: "
+ config.maxBrushRadius); + config.maxBrushRadius);
@ -227,7 +227,7 @@ public class BrushCommands {
tool.setMask(new BlockTypeMask(BlockID.FIRE)); tool.setMask(new BlockTypeMask(BlockID.FIRE));
tool.setBrush(new SphereBrush(), "worldedit.brush.ex"); tool.setBrush(new SphereBrush(), "worldedit.brush.ex");
player.print(String.format("Extinguisher equipped (%d).", player.print(String.format("Extinguisher equipped (%.0f).",
radius)); radius));
} }
} }