mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Added sanity check to DataValidatorExtent.
This commit is contained in:
parent
0ed62b8f90
commit
16e89c23f5
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user