Allow masks parsed from input to ignore the blacklist.

Fixes WORLDEDIT-3149.
This commit is contained in:
sk89q 2014-07-06 18:10:30 -07:00
parent 85f014e256
commit 68e5d5926a
2 changed files with 23 additions and 1 deletions

View File

@ -42,6 +42,26 @@ public class ParserContext {
private boolean restricted = true; private boolean restricted = true;
private boolean preferringWildcard; private boolean preferringWildcard;
/**
* Create a new instance.
*/
public ParserContext() {
}
/**
* Creates a copy of another instance.
*
* @param other the other instance
*/
public ParserContext(ParserContext other) {
setExtent(other.getExtent());
setSession(other.getSession());
setWorld(other.getWorld());
setActor(other.getActor());
setRestricted(other.isRestricted());
setPreferringWildcard(other.isPreferringWildcard());
}
/** /**
* Get the {@link Extent} set on this context. * Get the {@link Extent} set on this context.
* *

View File

@ -132,7 +132,9 @@ class DefaultMaskParser extends InputParser<Mask> {
} }
default: default:
return new BlockMask(extent, worldEdit.getBlockRegistry().parseFromListInput(component, context)); ParserContext tempContext = new ParserContext(context);
tempContext.setRestricted(false);
return new BlockMask(extent, worldEdit.getBlockRegistry().parseFromListInput(component, tempContext));
} }
} }