mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
fix //removenear exception for size < 1
This commit is contained in:
parent
4198932432
commit
193361ac32
@ -366,6 +366,7 @@ public class UtilityCommands extends MethodCommands {
|
|||||||
@Logging(PLACEMENT)
|
@Logging(PLACEMENT)
|
||||||
public void removeNear(Player player, LocalSession session, EditSession editSession, Mask mask, @Optional("50") double size) throws WorldEditException {
|
public void removeNear(Player player, LocalSession session, EditSession editSession, Mask mask, @Optional("50") double size) throws WorldEditException {
|
||||||
worldEdit.checkMaxRadius(size);
|
worldEdit.checkMaxRadius(size);
|
||||||
|
size = Math.max(1, size);
|
||||||
int affected = editSession.removeNear(session.getPlacementPosition(player), mask, (int) size);
|
int affected = editSession.removeNear(session.getPlacementPosition(player), mask, (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