Fix brush scroll size with -1 brush radius

This commit is contained in:
Jesse Boyd 2017-04-01 16:59:33 +11:00
parent 381966e0ee
commit 594b836373
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -12,7 +12,7 @@ public class ScrollSize extends ScrollAction {
@Override
public boolean increment(Player player, int amount) {
int max = WorldEdit.getInstance().getConfiguration().maxRadius;
double newSize = Math.max(0, Math.min(max, getTool().getSize() + amount));
double newSize = Math.max(0, Math.min(max == -1 ? 4095 : max, getTool().getSize() + amount));
getTool().setSize(newSize);
return true;
}