File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
src/main/java/com/github/elic0de/thejpspit Expand file tree Collapse file tree 2 files changed +15
-3
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,7 +206,10 @@ public void increaseKills() {
206206
207207 public void increaseStreaks () {
208208 this .streaks ++;
209- if (bestStreaks > streaks ) {
209+
210+ if (streaks % 5 == 0 ) TheJpsPit .getInstance ().getGame ().broadcast (player .getName () + "&aが連続で&c" + streaks + "&aキルしています!" );
211+
212+ if (bestStreaks < streaks ) {
210213 this .bestStreaks = streaks ;
211214 }
212215 }
@@ -221,7 +224,7 @@ public void increaseXP() {
221224
222225 public void increaseHealth () {
223226 player .setHealth (Math .min (player .getAttribute (Attribute .GENERIC_MAX_HEALTH ).getValue (),
224- player .getHealth () + 2 ));
227+ player .getHealth () + 4 ));
225228 }
226229
227230 public void resetStreaks () {
You can’t perform that action at this time.
0 commit comments