mirror of
https://github.com/itHotL/PlayerStats.git
synced 2024-11-12 10:24:17 +01:00
Small bug fix (API didn't follow config-settings for use-dots)
This commit is contained in:
parent
329bc8fb10
commit
73c7fd8445
@ -4,7 +4,7 @@
|
||||
<groupId>io.github.ithotl</groupId>
|
||||
<artifactId>PlayerStats</artifactId>
|
||||
<name>PlayerStats</name>
|
||||
<version>1.7</version>
|
||||
<version>1.7.1</version>
|
||||
<description>Statistics Plugin</description>
|
||||
<url>https://www.spigotmc.org/resources/playerstats.102347/</url>
|
||||
<developers>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.github.ithotl</groupId>
|
||||
<artifactId>PlayerStats</artifactId>
|
||||
<version>1.7</version>
|
||||
<version>1.7.1</version>
|
||||
|
||||
<name>PlayerStats</name>
|
||||
<description>Statistics Plugin</description>
|
||||
|
@ -463,16 +463,22 @@ public final class MessageBuilder implements ApiFormatter {
|
||||
}
|
||||
|
||||
private TextComponent getTopStatLineComponent(int positionInTopList, String playerName, TextComponent statNumberComponent) {
|
||||
boolean useDots = config.useDots();
|
||||
String fullPlayerName = useDots ? playerName : playerName + ":";
|
||||
|
||||
TextComponent.Builder topStatLineBuilder = Component.text()
|
||||
.append(space())
|
||||
.append(componentFactory.rankNumber(positionInTopList))
|
||||
.append(space())
|
||||
.append(componentFactory.playerName(playerName, Target.TOP))
|
||||
.append(space());
|
||||
.append(componentFactory.playerName(fullPlayerName, Target.TOP));
|
||||
|
||||
int dots = getNumberOfDotsToAlign(positionInTopList + ". " + playerName);
|
||||
if (dots >= 1) {
|
||||
topStatLineBuilder.append(componentFactory.dots(".".repeat(dots)));
|
||||
if (config.useDots()) {
|
||||
int dots = getNumberOfDotsToAlign(positionInTopList + ". " + playerName);
|
||||
if (dots >= 1) {
|
||||
topStatLineBuilder
|
||||
.append(space())
|
||||
.append(componentFactory.dots(".".repeat(dots)));
|
||||
}
|
||||
}
|
||||
|
||||
return topStatLineBuilder
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: com.artemis.the.gr8.playerstats.Main
|
||||
name: PlayerStats
|
||||
version: 1.7
|
||||
version: 1.7.1
|
||||
api-version: 1.13
|
||||
description: adds commands to view player statistics in chat
|
||||
author: Artemis_the_gr8
|
||||
|
Loading…
Reference in New Issue
Block a user