Skip to content

Commit

Permalink
[Release] 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Josscoder committed Mar 29, 2023
2 parents a9c9016 + da36a4f commit b5da198
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Maven:
<dependency>
<groupId>com.github.Josscoder</groupId>
<artifactId>JNPC</artifactId>
<version>1.0.2-powernukkitx</version>
<version>1.0.3-powernukkitx</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>josscoder.jnpc</groupId>
<artifactId>JNPC</artifactId>
<version>1.0.2-powernukkitx</version>
<version>1.0.3-powernukkitx</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/josscoder/jnpc/JNPC.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ public static void init(PluginBase pluginBase) {
* @param npcListener the listener to handle NPCS actions
*/
public static void init(PluginBase pluginBase, NPCListener npcListener) {
NPCFactory.make();
init();
pluginBase.getServer().getPluginManager().registerEvents(npcListener, pluginBase);
}

/**
* Action to start the library without default listener
*/
public static void init() {
NPCFactory.make();
}
}

0 comments on commit b5da198

Please sign in to comment.