- Make disallowed-blocks translatable
- Add more trnslatable messages
- Update WorldEdit messages missing a prefix
This commit is contained in:
NotMyFault
2019-04-11 19:49:09 +02:00
parent 7a88039711
commit dcfa436c64
10 changed files with 30 additions and 20 deletions

View File

@ -309,12 +309,12 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
if (context.isRestricted()) {
Actor actor = context.requireActor();
if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().checkDisallowedBlocks(holder)) {
throw new DisallowedUsageException(BBC.getPrefix() + "You are not allowed to use '" + holder + "'");
throw new DisallowedUsageException(BBC.BLOCK_NOT_ALLOWED + " '" + holder + "'");
}
CompoundTag nbt = holder.getNbtData();
if (nbt != null) {
if (!actor.hasPermission("worldedit.anyblock")) {
throw new DisallowedUsageException(BBC.getPrefix() + "You are not allowed to nbt'");
throw new DisallowedUsageException("You are not allowed to nbt'");
}
}
}