mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 20:43:54 +00:00
Added sanity check to DataValidatorExtent.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user