Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
RoinujNosde committed Jun 16, 2022
2 parents 5027f6a + 2ac83f0 commit a1d069d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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 @@ -305,7 +305,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
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void maximumGroups(PlayerJoinGameEvent event) {

@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void groupMode(PlayerJoinGameEvent event) {
if (event.getWarrior().getGroup() == null) {
if (event.getGame().getConfig().isGroupMode() && event.getWarrior().getGroup() == null) {
cancelWithMessage(event, "not_in_a_group");
}
}
Expand Down

0 comments on commit a1d069d

Please sign in to comment.