Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 02:50:05 +01:00
Fixes #232 dont allow negative brush radius
Dieser Commit ist enthalten in:
Ursprung
cbeaa1a7a0
Commit
4f34d1b5d1
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.sk89q.worldedit.event.platform.Interaction.HIT;
|
||||
import static com.sk89q.worldedit.event.platform.Interaction.OPEN;
|
||||
|
||||
@ -408,8 +409,9 @@ public final class WorldEdit {
|
||||
}
|
||||
|
||||
public void checkMaxBrushRadius(Expression radius) throws MaxBrushRadiusException {
|
||||
double val = radius.evaluate();
|
||||
checkArgument(val >= 0);
|
||||
if (getConfiguration().maxBrushRadius > 0) {
|
||||
double val = radius.evaluate();
|
||||
if (val > getConfiguration().maxBrushRadius) {
|
||||
throw new MaxBrushRadiusException();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren