Skip to content

Commit ea91095

Browse files
authored
fancynpcs: The correct NpcsLoadedEvent call (#67)
1 parent 0395b94 commit ea91095

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Here is a list of contributors to the previous repositories:
6666
- [NonSwag](https://github.com/NonSwag)
6767
- [FrezzyDev](https://github.com/FrezzyDev)
6868
- [perkojack](https://github.com/perkojack)
69-
- [BigTowns](https://github.com/BigTowns)
69+
- [BigTows](https://github.com/BigTows)
7070
- [kforbro](https://github.com/kforbro)
7171
- [Kamillaova](https://github.com/Kamillaova)
7272
- [Emibergo02](https://github.com/Emibergo02)

plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public void loadNpcs() {
227227
YamlConfiguration npcConfig = YamlConfiguration.loadConfiguration(npcConfigFile);
228228

229229
if (!npcConfig.isConfigurationSection("npcs")) {
230-
isLoaded = true;
230+
this.setLoaded();
231231
return;
232232
}
233233

@@ -438,7 +438,10 @@ public void loadNpcs() {
438438
npc.create();
439439
registerNpc(npc);
440440
}
441+
this.setLoaded();
442+
}
441443

444+
private void setLoaded(){
442445
isLoaded = true;
443446
new NpcsLoadedEvent().callEvent();
444447
}

0 commit comments

Comments
 (0)