Optimize multilingualism (using variables)

Optimize multilingualism (using variables)
This commit is contained in:
方块君
2022-05-04 11:17:31 +08:00
committed by Melledy
parent ded4c76e68
commit 8451f960d4
28 changed files with 129 additions and 142 deletions

View File

@@ -79,7 +79,7 @@ public final class SpawnCommand implements CommandHandler {
sender.getScene().addEntity(entity);
}
CommandHandler.sendMessage(sender, String.format(Grasscutter.getLanguage().Spawn_message, amount, id));
CommandHandler.sendMessage(sender, Grasscutter.getLanguage().Spawn_message.replace("{amount}", Integer.toString(amount)).replace("{id}", Integer.toString(id)));
} catch (NumberFormatException ignored) {
CommandHandler.sendMessage(sender, Grasscutter.getLanguage().Invalid_entity_id);
}