mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Removed -q flag from //[h]sphere and the code to back it.
The speed difference between the "flexible" and the "quick" variant is so minor that it doesn't justify the aditional code complexity.
This commit is contained in:
@ -85,7 +85,6 @@ public class GenerationCommands {
|
||||
aliases = { "/hsphere" },
|
||||
usage = "<block> <radius>[,<radius>,<radius>] [raised?]",
|
||||
desc = "Generate a hollow sphere.",
|
||||
flags = "q",
|
||||
min = 2,
|
||||
max = 3
|
||||
)
|
||||
@ -95,29 +94,6 @@ public class GenerationCommands {
|
||||
LocalSession session, LocalPlayer player, EditSession editSession)
|
||||
throws WorldEditException {
|
||||
|
||||
if (args.hasFlag('q')) {
|
||||
Pattern block = we.getBlockPattern(player, args.getString(0));
|
||||
String[] radiuses = args.getString(1).split(",");
|
||||
if (radiuses.length > 1) {
|
||||
throw new InsufficientArgumentsException("Cannot specify q flag and multiple radiuses.");
|
||||
}
|
||||
double radius = Double.parseDouble(radiuses[0]);
|
||||
boolean raised = args.argsLength() > 2
|
||||
? (args.getString(2).equalsIgnoreCase("true")
|
||||
|| args.getString(2).equalsIgnoreCase("yes"))
|
||||
: false;
|
||||
|
||||
Vector pos = session.getPlacementPosition(player);
|
||||
if (raised) {
|
||||
pos = pos.add(0, radius, 0);
|
||||
}
|
||||
|
||||
int affected = editSession.makeSphere(pos, block, radius, false);
|
||||
player.findFreePosition();
|
||||
player.print(affected + " block(s) have been created.");
|
||||
return;
|
||||
}
|
||||
|
||||
final Pattern block = we.getBlockPattern(player, args.getString(0));
|
||||
String[] radiuses = args.getString(1).split(",");
|
||||
final double radiusX, radiusY, radiusZ;
|
||||
@ -157,7 +133,6 @@ public class GenerationCommands {
|
||||
aliases = { "/sphere" },
|
||||
usage = "<block> <radius>[,<radius>,<radius>] [raised?]",
|
||||
desc = "Generate a filled sphere.",
|
||||
flags = "q",
|
||||
min = 2,
|
||||
max = 3
|
||||
)
|
||||
@ -167,29 +142,6 @@ public class GenerationCommands {
|
||||
LocalSession session, LocalPlayer player, EditSession editSession)
|
||||
throws WorldEditException {
|
||||
|
||||
if (args.hasFlag('q')) {
|
||||
Pattern block = we.getBlockPattern(player, args.getString(0));
|
||||
String[] radiuses = args.getString(1).split(",");
|
||||
if (radiuses.length > 1) {
|
||||
throw new InsufficientArgumentsException("Cannot specify q flag and multiple radiuses.");
|
||||
}
|
||||
double radius = Double.parseDouble(radiuses[0]);
|
||||
boolean raised = args.argsLength() > 2
|
||||
? (args.getString(2).equalsIgnoreCase("true")
|
||||
|| args.getString(2).equalsIgnoreCase("yes"))
|
||||
: false;
|
||||
|
||||
Vector pos = session.getPlacementPosition(player);
|
||||
if (raised) {
|
||||
pos = pos.add(0, radius, 0);
|
||||
}
|
||||
|
||||
int affected = editSession.makeSphere(pos, block, radius, true);
|
||||
player.findFreePosition();
|
||||
player.print(affected + " block(s) have been created.");
|
||||
return;
|
||||
}
|
||||
|
||||
Pattern block = we.getBlockPattern(player, args.getString(0));
|
||||
String[] radiuses = args.getString(1).split(",");
|
||||
final double radiusX, radiusY, radiusZ;
|
||||
|
Reference in New Issue
Block a user