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 8733812e48
commit b8f5299995
28 changed files with 129 additions and 142 deletions

View File

@@ -49,7 +49,7 @@ public final class DropCommand implements CommandHandler {
EntityItem entity = new EntityItem(sender.getScene(), sender, itemData, sender.getPos().clone().addY(3f), amount);
sender.getScene().addEntity(entity);
}
CommandHandler.sendMessage(sender, String.format(Grasscutter.getLanguage().Drop_dropped_of, amount, item));
CommandHandler.sendMessage(sender, Grasscutter.getLanguage().Drop_dropped_of.replace("{amount}", Integer.toString(amount)).replace("{item}", Integer.toString(item)));
} catch (NumberFormatException ignored) {
CommandHandler.sendMessage(sender, Grasscutter.getLanguage().Invalid_item_or_player_id);
}