fancynpcs: The correct NpcsLoadedEvent call (#67)

This commit is contained in:
Alexander Chapchuk
2025-06-13 21:10:23 +03:00
committed by GitHub
parent 0395b942a1
commit ea91095bcf
2 changed files with 5 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ Here is a list of contributors to the previous repositories:
- [NonSwag](https://github.com/NonSwag)
- [FrezzyDev](https://github.com/FrezzyDev)
- [perkojack](https://github.com/perkojack)
- [BigTowns](https://github.com/BigTowns)
- [BigTows](https://github.com/BigTows)
- [kforbro](https://github.com/kforbro)
- [Kamillaova](https://github.com/Kamillaova)
- [Emibergo02](https://github.com/Emibergo02)

View File

@@ -227,7 +227,7 @@ public class NpcManagerImpl implements NpcManager {
YamlConfiguration npcConfig = YamlConfiguration.loadConfiguration(npcConfigFile);
if (!npcConfig.isConfigurationSection("npcs")) {
isLoaded = true;
this.setLoaded();
return;
}
@@ -438,7 +438,10 @@ public class NpcManagerImpl implements NpcManager {
npc.create();
registerNpc(npc);
}
this.setLoaded();
}
private void setLoaded(){
isLoaded = true;
new NpcsLoadedEvent().callEvent();
}