Skip to content

Commit

Permalink
(chore) bump plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
ylgrgyq committed Oct 14, 2019
1 parent 4fbd8cc commit e70fe61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

<groupId>cn.leancloud.play</groupId>
<artifactId>multiplayer-server-plugin-getting-started</artifactId>
<version>1.2</version>
<version>1.3</version>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>cn.leancloud.play</groupId>
<artifactId>multiplayer-server-plugin</artifactId>
<version>1.8</version>
<version>1.10</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public void onBeforeSendEvent(BeforeSendEventContext ctx) {
}

boolean masterIsInTargets = true;
List<Integer> targetActors = req.getToActorIds();
List<Integer> targetActors = req.getTargetActorIds();
if (!targetActors.isEmpty() &&
targetActors.stream().noneMatch(actorId -> actorId == master.getActorId())) {
masterIsInTargets = false;

ArrayList<Integer> newTargets = new ArrayList<>(targetActors);
newTargets.add(master.getActorId());
req.setToActorIds(newTargets);
req.setTargetActorIds(newTargets);
}

ctx.continueProcess();
Expand Down

0 comments on commit e70fe61

Please sign in to comment.