Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Fixed /removenear not taking a default size argument.
Dieser Commit ist enthalten in:
Ursprung
6b996435e3
Commit
6979704661
@ -62,6 +62,10 @@ public class CommandContext {
|
|||||||
return args[index + 1];
|
return args[index + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getString(int index, String def) {
|
||||||
|
return index + 1 < args.length ? args[index + 1] : def;
|
||||||
|
}
|
||||||
|
|
||||||
public String getJoinedStrings(int initialIndex) {
|
public String getJoinedStrings(int initialIndex) {
|
||||||
initialIndex = initialIndex + 1;
|
initialIndex = initialIndex + 1;
|
||||||
StringBuilder buffer = new StringBuilder(args[initialIndex]);
|
StringBuilder buffer = new StringBuilder(args[initialIndex]);
|
||||||
@ -75,10 +79,18 @@ public class CommandContext {
|
|||||||
return Integer.parseInt(args[index + 1]);
|
return Integer.parseInt(args[index + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getInteger(int index, int def) throws NumberFormatException {
|
||||||
|
return index + 1 < args.length ? Integer.parseInt(args[index + 1]) : def;
|
||||||
|
}
|
||||||
|
|
||||||
public double getDouble(int index) throws NumberFormatException {
|
public double getDouble(int index) throws NumberFormatException {
|
||||||
return Double.parseDouble(args[index + 1]);
|
return Double.parseDouble(args[index + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getDouble(int index, double def) throws NumberFormatException {
|
||||||
|
return index + 1 < args.length ? Double.parseDouble(args[index + 1]) : def;
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getSlice(int index) {
|
public String[] getSlice(int index) {
|
||||||
String[] slice = new String[args.length - index];
|
String[] slice = new String[args.length - index];
|
||||||
System.arraycopy(args, index, slice, 0, args.length - index);
|
System.arraycopy(args, index, slice, 0, args.length - index);
|
||||||
|
@ -204,7 +204,7 @@ public class UtilityCommands {
|
|||||||
throws WorldEditException {
|
throws WorldEditException {
|
||||||
|
|
||||||
BaseBlock block = we.getBlock(player, args.getString(0), true);
|
BaseBlock block = we.getBlock(player, args.getString(0), true);
|
||||||
int size = Math.max(1, args.getInteger(1));
|
int size = Math.max(1, args.getInteger(1, 50));
|
||||||
we.checkMaxRadius(size);
|
we.checkMaxRadius(size);
|
||||||
|
|
||||||
int affected = editSession.removeNear(
|
int affected = editSession.removeNear(
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren