mirror of
https://github.com/itHotL/PlayerStats.git
synced 2024-11-13 10:34:15 +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>
|
<groupId>io.github.ithotl</groupId>
|
||||||
<artifactId>PlayerStats</artifactId>
|
<artifactId>PlayerStats</artifactId>
|
||||||
<name>PlayerStats</name>
|
<name>PlayerStats</name>
|
||||||
<version>1.7</version>
|
<version>1.7.1</version>
|
||||||
<description>Statistics Plugin</description>
|
<description>Statistics Plugin</description>
|
||||||
<url>https://www.spigotmc.org/resources/playerstats.102347/</url>
|
<url>https://www.spigotmc.org/resources/playerstats.102347/</url>
|
||||||
<developers>
|
<developers>
|
||||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>io.github.ithotl</groupId>
|
<groupId>io.github.ithotl</groupId>
|
||||||
<artifactId>PlayerStats</artifactId>
|
<artifactId>PlayerStats</artifactId>
|
||||||
<version>1.7</version>
|
<version>1.7.1</version>
|
||||||
|
|
||||||
<name>PlayerStats</name>
|
<name>PlayerStats</name>
|
||||||
<description>Statistics Plugin</description>
|
<description>Statistics Plugin</description>
|
||||||
|
@ -463,16 +463,22 @@ public final class MessageBuilder implements ApiFormatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private TextComponent getTopStatLineComponent(int positionInTopList, String playerName, TextComponent statNumberComponent) {
|
private TextComponent getTopStatLineComponent(int positionInTopList, String playerName, TextComponent statNumberComponent) {
|
||||||
|
boolean useDots = config.useDots();
|
||||||
|
String fullPlayerName = useDots ? playerName : playerName + ":";
|
||||||
|
|
||||||
TextComponent.Builder topStatLineBuilder = Component.text()
|
TextComponent.Builder topStatLineBuilder = Component.text()
|
||||||
.append(space())
|
.append(space())
|
||||||
.append(componentFactory.rankNumber(positionInTopList))
|
.append(componentFactory.rankNumber(positionInTopList))
|
||||||
.append(space())
|
.append(space())
|
||||||
.append(componentFactory.playerName(playerName, Target.TOP))
|
.append(componentFactory.playerName(fullPlayerName, Target.TOP));
|
||||||
.append(space());
|
|
||||||
|
|
||||||
int dots = getNumberOfDotsToAlign(positionInTopList + ". " + playerName);
|
if (config.useDots()) {
|
||||||
if (dots >= 1) {
|
int dots = getNumberOfDotsToAlign(positionInTopList + ". " + playerName);
|
||||||
topStatLineBuilder.append(componentFactory.dots(".".repeat(dots)));
|
if (dots >= 1) {
|
||||||
|
topStatLineBuilder
|
||||||
|
.append(space())
|
||||||
|
.append(componentFactory.dots(".".repeat(dots)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return topStatLineBuilder
|
return topStatLineBuilder
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
main: com.artemis.the.gr8.playerstats.Main
|
main: com.artemis.the.gr8.playerstats.Main
|
||||||
name: PlayerStats
|
name: PlayerStats
|
||||||
version: 1.7
|
version: 1.7.1
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
description: adds commands to view player statistics in chat
|
description: adds commands to view player statistics in chat
|
||||||
author: Artemis_the_gr8
|
author: Artemis_the_gr8
|
||||||
|
Loading…
Reference in New Issue
Block a user