Allow masks parsed from input to ignore the blacklist.

Fixes WORLDEDIT-3149.
Dieser Commit ist enthalten in:
sk89q 2014-07-06 18:10:30 -07:00
Ursprung 85f014e256
Commit 68e5d5926a
2 geänderte Dateien mit 23 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -42,6 +42,26 @@ public class ParserContext {
private boolean restricted = true;
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.
*

Datei anzeigen

@ -132,7 +132,9 @@ class DefaultMaskParser extends InputParser<Mask> {
}
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));
}
}