Improve translate function

Make commands pass ints and floats instead of manually casting them to string first
This commit is contained in:
AnimeGitB
2022-08-21 20:23:39 +09:30
committed by Luke H-W
parent 4b03770ec1
commit 955004343f
14 changed files with 54 additions and 30 deletions

View File

@@ -17,7 +17,7 @@ public final class WeatherCommand implements CommandHandler {
if (args.isEmpty()) {
climate = targetPlayer.getClimate();
CommandHandler.sendTranslatedMessage(sender, "commands.weather.status", Integer.toString(weatherId), climate.getShortName());
CommandHandler.sendTranslatedMessage(sender, "commands.weather.status", weatherId, climate.getShortName());
return;
}
@@ -38,6 +38,6 @@ public final class WeatherCommand implements CommandHandler {
targetPlayer.setWeather(weatherId, climate);
climate = targetPlayer.getClimate(); // Might be different to what we set
CommandHandler.sendTranslatedMessage(sender, "commands.weather.success", Integer.toString(weatherId), climate.getShortName());
CommandHandler.sendTranslatedMessage(sender, "commands.weather.success", weatherId, climate.getShortName());
}
}