mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Fixed the getTitle method.
This commit is contained in:
parent
7ad4d92a14
commit
1f9cbc0b13
@ -185,9 +185,10 @@ public final class PlayerProfile {
|
||||
|
||||
public String getTitle() {
|
||||
List<String> titles = SlimefunPlugin.getSettings().researchesTitles;
|
||||
|
||||
int index = Math.round(Float.valueOf(String.valueOf(Math.round(((researches.size() * 100.0F) / Research.list().size()) * 100.0F) / 100.0F)) / 100.0F) * titles.size();
|
||||
if (index > 0) index--;
|
||||
|
||||
float fraction = (float) researches.size() / Research.list().size();
|
||||
int index = (int) (fraction * (titles.size() -1));
|
||||
|
||||
return titles.get(index);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user