Add spaces between /npc villager output

This commit is contained in:
fullwall 2020-10-03 22:13:47 +08:00
parent a89ed9e739
commit 9f7e57fbda
3 changed files with 12 additions and 12 deletions

View File

@ -461,7 +461,7 @@ public class Commands {
throw new CommandUsageException();
}
trait.setLevel(args.getFlagInteger("level"));
output += Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
output += " " + Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
}
if (args.hasValueFlag("type")) {
Villager.Type type = Util.matchEnum(Villager.Type.values(), args.getFlag("type"));
@ -470,7 +470,7 @@ public class Commands {
Util.listValuesPretty(Villager.Type.values()));
}
trait.setType(type);
output += Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
output += " " + Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
}
if (args.hasValueFlag("profession")) {
Profession parsed = Util.matchEnum(Profession.values(), args.getFlag("profession"));
@ -479,10 +479,10 @@ public class Commands {
Joiner.on(',').join(Profession.values()));
}
npc.getOrAddTrait(VillagerProfession.class).setProfession(parsed);
output += Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
output += " " + Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
}
if (!output.isEmpty()) {
Messaging.send(sender, output);
Messaging.send(sender, output.trim());
} else {
throw new CommandUsageException();
}

View File

@ -505,7 +505,7 @@ public class Commands {
throw new CommandUsageException();
}
trait.setLevel(args.getFlagInteger("level"));
output += Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
output += " " + Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
}
if (args.hasValueFlag("type")) {
Villager.Type type = Util.matchEnum(Villager.Type.values(), args.getFlag("type"));
@ -514,7 +514,7 @@ public class Commands {
Util.listValuesPretty(Villager.Type.values()));
}
trait.setType(type);
output += Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
output += " " + Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
}
if (args.hasValueFlag("profession")) {
Profession parsed = Util.matchEnum(Profession.values(), args.getFlag("profession"));
@ -523,10 +523,10 @@ public class Commands {
Joiner.on(',').join(Profession.values()));
}
npc.getOrAddTrait(VillagerProfession.class).setProfession(parsed);
output += Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
output += " " + Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
}
if (!output.isEmpty()) {
Messaging.send(sender, output);
Messaging.send(sender, output.trim());
} else {
throw new CommandUsageException();
}

View File

@ -505,7 +505,7 @@ public class Commands {
throw new CommandUsageException();
}
trait.setLevel(args.getFlagInteger("level"));
output += Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
output += " " + Messaging.tr(Messages.VILLAGER_LEVEL_SET, args.getFlagInteger("level"));
}
if (args.hasValueFlag("type")) {
Villager.Type type = Util.matchEnum(Villager.Type.values(), args.getFlag("type"));
@ -514,7 +514,7 @@ public class Commands {
Util.listValuesPretty(Villager.Type.values()));
}
trait.setType(type);
output += Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
output += " " + Messaging.tr(Messages.VILLAGER_TYPE_SET, args.getFlag("type"));
}
if (args.hasValueFlag("profession")) {
Profession parsed = Util.matchEnum(Profession.values(), args.getFlag("profession"));
@ -523,10 +523,10 @@ public class Commands {
Joiner.on(',').join(Profession.values()));
}
npc.getOrAddTrait(VillagerProfession.class).setProfession(parsed);
output += Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
output += " " + Messaging.tr(Messages.PROFESSION_SET, npc.getName(), args.getFlag("profession"));
}
if (!output.isEmpty()) {
Messaging.send(sender, output);
Messaging.send(sender, output.trim());
} else {
throw new CommandUsageException();
}