File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/main/java/com/github/elic0de/thejpspit Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 44import com .github .elic0de .thejpspit .player .PitPlayer ;
55import com .github .elic0de .thejpspit .scoreboard .GameScoreboard ;
66import com .github .elic0de .thejpspit .task .GameTask ;
7- import com . github . elic0de . thejpspit . util . killAssistHelper . KillAssistHelper ;
7+ import de . themoep . minedown . MineDown ;
88import java .util .HashSet ;
99import java .util .Set ;
10+ import org .bukkit .entity .Player ;
1011
1112public class Game {
1213
@@ -68,6 +69,14 @@ public void death(PitPlayer player) {
6869 //KillAssistHelper.test(player.getPlayer());
6970 }
7071
72+ public void broadcast (String message ) {
73+ for (PitPlayer pitPlayer : getPitPlayers ()) {
74+ final Player player = pitPlayer .getPlayer ();
75+
76+ player .spigot ().sendMessage (new MineDown (message ).toComponent ());
77+ }
78+ }
79+
7180 public Set <PitPlayer > getPitPlayers () {
7281 return pitPlayers ;
7382 }
Original file line number Diff line number Diff line change @@ -206,6 +206,9 @@ public void increaseKills() {
206206
207207 public void increaseStreaks () {
208208 this .streaks ++;
209+
210+ if (streaks % 5 == 0 ) TheJpsPit .getInstance ().getGame ().broadcast (player .getName () + "&aが連続で&c" + streaks + "&aキルしています!" );
211+
209212 if (bestStreaks < streaks ) {
210213 this .bestStreaks = streaks ;
211214 }
You can’t perform that action at this time.
0 commit comments