mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fixed exceptions in //brush since build #115.
This commit is contained in:
parent
b8a987b204
commit
8d688165ee
@ -82,7 +82,7 @@ public class BrushCommands {
|
||||
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));
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ public class BrushCommands {
|
||||
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));
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ public class BrushCommands {
|
||||
|
||||
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) {
|
||||
player.printError("Maximum allowed brush radius: "
|
||||
+ config.maxBrushRadius);
|
||||
@ -195,7 +195,7 @@ public class BrushCommands {
|
||||
tool.setSize(radius);
|
||||
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));
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ public class BrushCommands {
|
||||
|
||||
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) {
|
||||
player.printError("Maximum allowed brush radius: "
|
||||
+ config.maxBrushRadius);
|
||||
@ -227,7 +227,7 @@ public class BrushCommands {
|
||||
tool.setMask(new BlockTypeMask(BlockID.FIRE));
|
||||
tool.setBrush(new SphereBrush(), "worldedit.brush.ex");
|
||||
|
||||
player.print(String.format("Extinguisher equipped (%d).",
|
||||
player.print(String.format("Extinguisher equipped (%.0f).",
|
||||
radius));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user