mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 11:40:41 +00:00
Fix rating when no categories are configured
This commit is contained in:
parent
e3cb59f362
commit
a71d5a134b
1 changed files with 7 additions and 7 deletions
|
@ -20,14 +20,14 @@ public class Rating {
|
|||
public Rating(int value) {
|
||||
this.initial = value;
|
||||
ratingMap = new HashMap<>();
|
||||
if (value < 10) {
|
||||
for (int i = 0 ; i < Settings.RATING_CATEGORIES.size(); i++) {
|
||||
ratingMap.put(Settings.RATING_CATEGORIES.get(i), value);
|
||||
}
|
||||
changed = true;
|
||||
return;
|
||||
}
|
||||
if (Settings.RATING_CATEGORIES != null && Settings.RATING_CATEGORIES.size() > 1) {
|
||||
if (value < 10) {
|
||||
for (int i = 0 ; i < Settings.RATING_CATEGORIES.size(); i++) {
|
||||
ratingMap.put(Settings.RATING_CATEGORIES.get(i), value);
|
||||
}
|
||||
changed = true;
|
||||
return;
|
||||
}
|
||||
for (int i = 0 ; i < Settings.RATING_CATEGORIES.size(); i++) {
|
||||
ratingMap.put(Settings.RATING_CATEGORIES.get(i), (value % 10) - 1);
|
||||
value /= 10;
|
||||
|
|
Loading…
Reference in a new issue