Skip to content

Commit

Permalink
patch up misfiring of pause/unpause
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 31, 2021
1 parent 1379daf commit 6ab23c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,20 @@ If you're building a separate plugin you would like to integrate into Sentinel,
<url>https://repo.citizensnpcs.co</url>
</repository>
```
- And add Sentinel as a `provided` dependency (be sure to change the version to match the current version available):
- And add Sentinel as a `provided` dependency (be sure to change the version to match the current version available) (note that the `exclusions` block can help to prevent maven issues):
```xml
<dependency>
<groupId>org.mcmonkey</groupId>
<artifactId>sentinel</artifactId>
<version>2.3.0-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
```
- You will also want to link Citizens in Maven if you haven't already - see https://wiki.citizensnpcs.co/API for relevant information on that.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -1486,10 +1486,10 @@ public void runUpdate() {
if (!npc.getNavigator().isNavigating()) {
pathingTo = null;
}
if ((guarded != null || chasing != null || pathingTo != null) && npc.hasTrait(Waypoints.class)) {
if ((guarded != null || chasing != null || pathingTo != null) && !otherBehaviorPaused) {
pauseWaypoints();
}
else {
else if (otherBehaviorPaused) {
unpauseWaypoints();
}
// Targets updating
Expand Down

0 comments on commit 6ab23c7

Please sign in to comment.