From ea91095bcfacc675f89e453c6d6d50e58608a12c Mon Sep 17 00:00:00 2001 From: Alexander Chapchuk Date: Fri, 13 Jun 2025 21:10:23 +0300 Subject: [PATCH] fancynpcs: The correct NpcsLoadedEvent call (#67) --- README.md | 2 +- .../src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0235be9c..3c16eafe 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java b/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java index 027789bc..d45a75f0 100644 --- a/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java +++ b/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java @@ -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(); }