Skip to content

Commit 5119ba6

Browse files
committed
Existing nbt permission should allow default nbt
1 parent dba5fea commit 5119ba6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -607,14 +607,17 @@ private <T extends BlockStateHolder> T validate(ParserContext context, T holder)
607607
}
608608
CompoundTag nbt = holder.getNbtData();
609609
if (nbt != null) {
610+
if (actor.hasPermission("worldedit.anyblock.nbt")) {
611+
return holder;
612+
}
610613
if (nbt.equals(holder.getBlockType().getDefaultState().getNbtData())) {
611614
if (!actor.hasPermission("worldedit.anyblock.default-nbt")) {
612615
throw new DisallowedUsageException(Caption.of(
613616
"fawe.error.nbt.forbidden",
614617
TextComponent.of("worldedit.anyblock.default-nbt")
615618
));
616619
}
617-
} else if (!actor.hasPermission("worldedit.anyblock.nbt")) {
620+
} else {
618621
throw new DisallowedUsageException(Caption.of(
619622
"fawe.error.nbt.forbidden",
620623
TextComponent.of("worldedit.anyblock.nbt")

0 commit comments

Comments
 (0)