Skip to content

Commit 1b567f1

Browse files
authored
Merge pull request #22 from JavaJava19/enchantment/delay_init_coins
将来的にmysql eco bridgeを使用しない方針でいきたいが解決策はこれしかないので妥協
2 parents 7586ab2 + 955676e commit 1b567f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/github/elic0de/thejpspit/scoreboard/PitPlayerScoreboard.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.stream.Stream;
1010
import me.clip.placeholderapi.PlaceholderAPI;
1111
import org.apache.commons.lang.StringUtils;
12+
import org.bukkit.Bukkit;
1213
import org.bukkit.ChatColor;
1314

1415
public class PitPlayerScoreboard {
@@ -61,6 +62,11 @@ private void updateLine(int line, String text) {
6162
}
6263

6364
private List<String> init(PitPlayer player) {
65+
Bukkit.getScheduler().runTaskLater(TheJpsPit.getInstance(), () -> {
66+
if (!board.isDeleted()) {
67+
updateCoins();
68+
}
69+
}, 20);
6470
return Stream.of(
6571
"",
6672
"レベル: [%level%]",

0 commit comments

Comments
 (0)