File tree Expand file tree Collapse file tree 2 files changed +25
-15
lines changed
src/main/java/com/github/elic0de/thejpspit/spigot Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 11package com .github .elic0de .thejpspit .spigot .config ;
22
3+ import java .util .Arrays ;
4+ import java .util .List ;
35import net .william278 .annotaml .YamlComment ;
46import net .william278 .annotaml .YamlFile ;
57import net .william278 .annotaml .YamlKey ;
@@ -11,7 +13,29 @@ public class Settings {
1113 @ YamlComment ("アクセストークンが漏洩すると、被害が広範囲に及ぶことになりますので公開しないでください" )
1214 private String githubToken = "" ;
1315
16+
17+ @ YamlKey ("waiting" )
18+ private List <String > scoreboard = Arrays .asList (
19+ "" ,
20+ "レベル: [%level%]" ,
21+ "JP: [%coins%]" ,
22+ "" ,
23+ "K/Dレート: &c%rating%" ,
24+ "最高レート: &b%bestRating%" ,
25+ "" ,
26+ "次のレベルまで:&a%neededXp%" ,
27+ "" ,
28+ "連続キル数: &a%streaks%" ,
29+ "最高連続キル数: &a%bestStreaks%" ,
30+ "" ,
31+ "&ejapanpvpserver.net"
32+ );
33+
1434 public String getGithubToken () {
1535 return githubToken ;
1636 }
37+
38+ public List <String > getScoreboard () {
39+ return scoreboard ;
40+ }
1741}
Original file line number Diff line number Diff line change @@ -33,21 +33,7 @@ public List<String> boardLines(PitPlayer player) {
3333 }
3434
3535 String finalCoin = coin ;
36- return Stream .of (
37- "" ,
38- "レベル: [%level%]" ,
39- "JP: [%coins%]" ,
40- "" ,
41- "K/Dレート: &c%rating%" ,
42- "最高レート: &b%bestRating%" ,
43- "" ,
44- "次のレベルまで:&a%neededXp%" ,
45- "" ,
46- "連続キル数: &a%streaks%" ,
47- "最高連続キル数: &a%bestStreaks%" ,
48- "" ,
49- "&ejapanpvpserver.net"
50- ).map (s ->
36+ return TheJpsPit .getInstance ().getSettings ().getScoreboard ().stream ().map (s ->
5137 s .replaceAll ("%level%" , Levels .getPlayerLevelColor (player .getLevel ()) + "" + player .getLevel () + ChatColor .RESET )
5238 .replaceAll ("%neededXp%" , Levels .getPlayerNeededXP (player .getLevel (),
5339 (int ) player .getXp ()) + "" )
You can’t perform that action at this time.
0 commit comments