3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00

Added sanity check to DataValidatorExtent.

Dieser Commit ist enthalten in:
sk89q 2014-04-03 20:09:01 -07:00
Ursprung 0ed62b8f90
Commit 16e89c23f5

Datei anzeigen

@ -60,10 +60,16 @@ public class DataValidatorExtent extends AbstractDelegateExtent {
return false;
}
if (type == 0) {
block.setData(0);
if (block.getData() < 0) {
throw new SevereValidationException("Cannot set a data value that is less than 0");
}
return super.setBlock(location, block);
}
private static class SevereValidationException extends WorldEditException {
private SevereValidationException(String message) {
super(message);
}
}
}