mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-01-08 19:37:58 +01:00
This commit is contained in:
parent
8e0666bceb
commit
b6be510462
@ -205,7 +205,7 @@ public class MessageFactory {
|
||||
return topList.build();
|
||||
}
|
||||
|
||||
public TextComponent formatServerStat(String statName, String subStatEntry, int stat) {
|
||||
public TextComponent formatServerStat(String statName, String subStatEntry, long stat) {
|
||||
return Component.text()
|
||||
.append(titleComponent(Query.SERVER, config.getServerTitle()))
|
||||
.append(space())
|
||||
@ -317,10 +317,8 @@ public class MessageFactory {
|
||||
.append(text(")"))
|
||||
.color(getColorFromString(config.getSubStatNameFormatting(selection, false)));
|
||||
|
||||
subStat.decorations(TextDecoration.NAMES.values(), false);
|
||||
if (style != null) subStat.decoration(style, TextDecoration.State.TRUE);
|
||||
else {
|
||||
subStat.decorations(TextDecoration.NAMES.values(), false);
|
||||
}
|
||||
return subStat.build();
|
||||
}
|
||||
else {
|
||||
@ -328,7 +326,7 @@ public class MessageFactory {
|
||||
}
|
||||
}
|
||||
|
||||
protected TextComponent statNumberComponent(Query selection, int number) {
|
||||
protected TextComponent statNumberComponent(Query selection, long number) {
|
||||
return getComponent(number + "",
|
||||
getColorFromString(config.getStatNumberFormatting(selection, false)),
|
||||
getStyleFromString(config.getStatNumberFormatting(selection, true)));
|
||||
|
@ -126,7 +126,7 @@ public class StatThread extends Thread {
|
||||
.limit(config.getTopListMaxSize()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
|
||||
}
|
||||
|
||||
private int getServerTotal() {
|
||||
private long getServerTotal() {
|
||||
List<Integer> numbers = getAllStats().values().stream().toList();
|
||||
return numbers.parallelStream().mapToInt(Integer::intValue).sum();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user