mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-28 03:19:12 +00:00
Fix some bugs
This commit is contained in:
@@ -64,7 +64,9 @@ public class ActionBarSender {
|
||||
|
||||
@SuppressWarnings("DuplicatedCode")
|
||||
private void updatePrivatePlaceholders() {
|
||||
this.privateContext.arg(ContextKeys.SCORE_FORMATTED, String.format("%.2f", competition.getRanking().getPlayerScore(player.getName())));
|
||||
double score = competition.getRanking().getPlayerScore(player.getName());
|
||||
this.privateContext.arg(ContextKeys.SCORE_FORMATTED, String.format("%.2f", score));
|
||||
this.privateContext.arg(ContextKeys.SCORE, score);
|
||||
int rank = competition.getRanking().getPlayerRank(player.getName());
|
||||
this.privateContext.arg(ContextKeys.RANK, rank != -1 ? String.valueOf(rank) : TranslationManager.miniMessageTranslation(MessageConstants.COMPETITION_NO_RANK.build().key()));
|
||||
this.privateContext.combine(competition.getPublicContext());
|
||||
|
||||
@@ -74,7 +74,9 @@ public class BossBarSender {
|
||||
|
||||
@SuppressWarnings("DuplicatedCode")
|
||||
private void updatePrivatePlaceholders() {
|
||||
this.privateContext.arg(ContextKeys.SCORE_FORMATTED, String.format("%.2f", competition.getRanking().getPlayerScore(player.getName())));
|
||||
double score = competition.getRanking().getPlayerScore(player.getName());
|
||||
this.privateContext.arg(ContextKeys.SCORE_FORMATTED, String.format("%.2f", score));
|
||||
this.privateContext.arg(ContextKeys.SCORE, score);
|
||||
int rank = competition.getRanking().getPlayerRank(player.getName());
|
||||
this.privateContext.arg(ContextKeys.RANK, rank != -1 ? String.valueOf(rank) : TranslationManager.miniMessageTranslation(MessageConstants.COMPETITION_NO_RANK.build().key()));
|
||||
this.privateContext.combine(competition.getPublicContext());
|
||||
|
||||
@@ -107,6 +107,7 @@ public class Migration {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8))) {
|
||||
writer.write(sb.toString()
|
||||
.replace("{score}", "{score_formatted}")
|
||||
.replace("{size}", "{size_formatted}")
|
||||
.replace("{SIZE}", "{size}")
|
||||
.replace("{price}", "{price_formatted}")
|
||||
|
||||
Reference in New Issue
Block a user