Fixing error when radius was smaller then 1

This commit is contained in:
NotMyFault 2018-12-29 13:35:35 +01:00 committed by GitHub
parent d131fa657e
commit e5c7042e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -349,6 +349,7 @@ public class UtilityCommands extends MethodCommands {
@Logging(PLACEMENT)
public void removeNear(Player player, LocalSession session, EditSession editSession, BaseBlock block, @Optional("50") double size) throws WorldEditException {
worldEdit.checkMaxRadius(size);
size = Math.max(1, size);
int affected = editSession.removeNear(session.getPlacementPosition(player), block.getId(), (int) size);
player.print(BBC.getPrefix() + affected + " block(s) have been removed.");
}