Skip to content

Commit

Permalink
fix: /tb setwinner would give prizes to everyone still alive
Browse files Browse the repository at this point in the history
Closes #69
  • Loading branch information
RoinujNosde committed Jun 14, 2022
1 parent 547304f commit 2ac83f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/roinujnosde/titansbattle/BaseGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ protected void givePrizes(Prize prize, @Nullable Group group, @Nullable List<War
if (warriors == null) {
return;
}
List<Player> players = getPlayerParticipantsStream().collect(Collectors.toList());
List<Player> players = warriors.stream().map(Warrior::toOnlinePlayer).filter(Objects::nonNull)
.collect(Collectors.toList());
if (group != null) {
for (Player p : players) {
if (group.isLeaderOrOfficer(p.getUniqueId())) {
Expand Down

0 comments on commit 2ac83f0

Please sign in to comment.