Skip to content

Commit e1d030d

Browse files
authored
Merge pull request #10 from JavaJava19/develop
Develop
2 parents ef0ec60 + b9fae91 commit e1d030d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/main/java/com/github/elic0de/thejpspit/game/Game.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import com.github.elic0de.thejpspit.player.PitPlayer;
55
import com.github.elic0de.thejpspit.scoreboard.GameScoreboard;
66
import com.github.elic0de.thejpspit.task.GameTask;
7-
import com.github.elic0de.thejpspit.util.killAssistHelper.KillAssistHelper;
7+
import de.themoep.minedown.MineDown;
88
import java.util.HashSet;
99
import java.util.Set;
10+
import org.bukkit.entity.Player;
1011

1112
public 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
}

src/main/java/com/github/elic0de/thejpspit/player/PitPlayer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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() {

0 commit comments

Comments
 (0)