Fixing error when radius was smaller then 1
This commit is contained in:
parent
d131fa657e
commit
e5c7042e25
@ -349,6 +349,7 @@ public class UtilityCommands extends MethodCommands {
|
|||||||
@Logging(PLACEMENT)
|
@Logging(PLACEMENT)
|
||||||
public void removeNear(Player player, LocalSession session, EditSession editSession, BaseBlock block, @Optional("50") double size) throws WorldEditException {
|
public void removeNear(Player player, LocalSession session, EditSession editSession, BaseBlock block, @Optional("50") double size) throws WorldEditException {
|
||||||
worldEdit.checkMaxRadius(size);
|
worldEdit.checkMaxRadius(size);
|
||||||
|
size = Math.max(1, size);
|
||||||
int affected = editSession.removeNear(session.getPlacementPosition(player), block.getId(), (int) size);
|
int affected = editSession.removeNear(session.getPlacementPosition(player), block.getId(), (int) size);
|
||||||
player.print(BBC.getPrefix() + affected + " block(s) have been removed.");
|
player.print(BBC.getPrefix() + affected + " block(s) have been removed.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user