I should probably have a perm for that

This commit is contained in:
Jesse Boyd 2017-01-09 04:47:55 +11:00
parent ea637dbbfd
commit f6db2cf7d3
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -322,6 +322,9 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
try {
CompoundTag nbt = JSON2NBT.getTagFromJson(joined);
if (nbt != null) {
if (context.isRestricted() && actor != null && !actor.hasPermission("worldedit.anyblock")) {
throw new DisallowedUsageException("You are not allowed to nbt'");
}
return new BaseBlock(blockId, data, nbt);
}
} catch (NBTException e) {