mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-01-23 21:51:19 +01:00
This commit is contained in:
parent
8e0666bceb
commit
b6be510462
@ -205,7 +205,7 @@ public class MessageFactory {
|
|||||||
return topList.build();
|
return topList.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextComponent formatServerStat(String statName, String subStatEntry, int stat) {
|
public TextComponent formatServerStat(String statName, String subStatEntry, long stat) {
|
||||||
return Component.text()
|
return Component.text()
|
||||||
.append(titleComponent(Query.SERVER, config.getServerTitle()))
|
.append(titleComponent(Query.SERVER, config.getServerTitle()))
|
||||||
.append(space())
|
.append(space())
|
||||||
@ -317,10 +317,8 @@ public class MessageFactory {
|
|||||||
.append(text(")"))
|
.append(text(")"))
|
||||||
.color(getColorFromString(config.getSubStatNameFormatting(selection, false)));
|
.color(getColorFromString(config.getSubStatNameFormatting(selection, false)));
|
||||||
|
|
||||||
|
subStat.decorations(TextDecoration.NAMES.values(), false);
|
||||||
if (style != null) subStat.decoration(style, TextDecoration.State.TRUE);
|
if (style != null) subStat.decoration(style, TextDecoration.State.TRUE);
|
||||||
else {
|
|
||||||
subStat.decorations(TextDecoration.NAMES.values(), false);
|
|
||||||
}
|
|
||||||
return subStat.build();
|
return subStat.build();
|
||||||
}
|
}
|
||||||
else {
|
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 + "",
|
return getComponent(number + "",
|
||||||
getColorFromString(config.getStatNumberFormatting(selection, false)),
|
getColorFromString(config.getStatNumberFormatting(selection, false)),
|
||||||
getStyleFromString(config.getStatNumberFormatting(selection, true)));
|
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));
|
.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();
|
List<Integer> numbers = getAllStats().values().stream().toList();
|
||||||
return numbers.parallelStream().mapToInt(Integer::intValue).sum();
|
return numbers.parallelStream().mapToInt(Integer::intValue).sum();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user