1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

[Ci skip] Little tweak

This commit is contained in:
TheBusyBiscuit 2020-03-10 22:28:17 +01:00
parent 08277133aa
commit d68c019396
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@
* Teleporters are now significantly faster
### Fixes
* Fixed some languages showing numbers larger than 100%
## Release Candidate 9 (07 Mar 2020)

View File

@ -173,7 +173,7 @@ public class LocalizationService extends SlimefunLocalization {
int defaultKeys = getTotalKeys(languages.get("en"));
if (defaultKeys == 0) return 0;
return DoubleHandler.fixDouble(100.0 * (getTotalKeys(lang) / (double) defaultKeys));
return Math.min(DoubleHandler.fixDouble(100.0 * (getTotalKeys(lang) / (double) defaultKeys)), 100.0);
}
private int getTotalKeys(Language lang) {