Skip to content

Commit e8516e3

Browse files
committed
Change value in leaderboards from int to double
1 parent 64dbceb commit e8516e3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

noteblock-api/src/main/java/gg/makera/noteblock/api/NoteblockAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface NoteblockAPI extends AutoCloseable {
2020
CompletableFuture<LeaderboardUpdateResponse> updateLeaderboard(int serverId,
2121
@NotNull String leaderboardId,
2222
@NotNull String playerName,
23-
int value);
23+
double value);
2424

2525
CompletableFuture<UserInfoResponse> getUserInfo();
2626

noteblock-api/src/main/java/gg/makera/noteblock/api/NoteblockAPIImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public CompletableFuture<LeaderboardInfoResponse> getLeaderboardInfo(int serverI
4444
public CompletableFuture<LeaderboardUpdateResponse> updateLeaderboard(int serverId,
4545
@NotNull String leaderboardId,
4646
@NotNull String playerName,
47-
int value) {
47+
double value) {
4848
return request(LeaderboardUpdateResponse.class, new LeaderboardUpdateRequest(serverId, leaderboardId, playerName, value));
4949
}
5050

noteblock-api/src/main/java/gg/makera/noteblock/api/request/LeaderboardUpdateRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public final class LeaderboardUpdateRequest implements NoteblockRequest {
1111
private final int serverId;
1212
private final String leaderboardId;
1313
private final String playerName;
14-
private final int value;
14+
private final double value;
1515

16-
public LeaderboardUpdateRequest(int serverId, @NotNull String leaderboardId, @NotNull String playerName, int value) {
16+
public LeaderboardUpdateRequest(int serverId, @NotNull String leaderboardId, @NotNull String playerName, double value) {
1717
this.serverId = serverId;
1818
this.leaderboardId = leaderboardId;
1919
this.playerName = playerName;

noteblock-api/src/main/java/gg/makera/noteblock/api/response/LeaderboardInfoResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public List<Entry> getEntries() {
6767
public static class Entry {
6868

6969
private String playerName;
70-
private int value;
70+
private double value;
7171

7272
@SerializedName("entry_position")
7373
private int position;
@@ -93,7 +93,7 @@ public String getPlayerName() {
9393
*
9494
* @return entry value (aka statistic)
9595
*/
96-
public int getValue() {
96+
public double getValue() {
9797
return value;
9898
}
9999

0 commit comments

Comments
 (0)