▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/VillageAI
VillageAI

VillageAI

Intelligent village defense system. Villages centered on bells automatically detect nearby villagers. Friendly players gain reputation by trading. Hostile players lose reputation by attacking villagers. When hostile players are nearby reputation drops belo

100
3
Все версииVillageAI 2.1.1

VillageAI 2.1.1

Release2 нед. назад

Список изменений

[2.1.1] - 2026-03-11 - Bug Fix Release

🐛 Bug Fixes

  • Village data lost on restartloadVillagesAsync() and validateVillageData() checked for a "villages" YAML section that was never written; data is saved at root level ("village-0", "village-1", …). Both methods now iterate root keys directly, so all villages survive server restarts.

  • Data loss on shutdown (async save race)onDisable() called saveVillages() which used CompletableFuture.supplyAsync(). On server shutdown, the JVM kills thread pools before async tasks complete, silently discarding the save. onDisable() now calls a new synchronous saveVillagesSync() method that blocks until the file is written.

  • VillageValidator NPE on class loadprivate static final Logger logger = VillageAIPlugin.getInstance().getLogger() was evaluated when the class was first loaded by the JVM — potentially before onEnable() sets the instance — causing a NullPointerException. Replaced with a lazy logger() method that reads the instance at call time.

  • /vtrade accept always returned "Quest not found" — The command displayed only the first 8 characters of the quest UUID (e.g. a1b2c3d4), then tried to reconstruct a full UUID by appending "-0000-0000-0000-000000000000". This produced a UUID that never matched any quest. /vtrade quests now shows the full UUID, and /vtrade accept parses it directly without reconstruction.

  • VillageManager.restoreVillage() did not populate villagerToVillage map — Members were written directly into the Village set, bypassing addMember(). After a restart, getVillageOf(villager) always returned null for all loaded villagers. restoreVillage() now iterates restored members and inserts them into the map.

⚠️ Minor Fixes

  • ECONOMY_UPDATE_INTERVAL = 24000 was 24 000 ms (24 seconds), not 24 hours as the comment stated. Changed to 86_400_000L.

  • VillageEconomy.getVillageUUID() returned world UUID — every village in the same world shared the same economy UUID, making trade offers indistinguishable across villages. Now derives a deterministic per-village UUID from the village's coordinate-based ID string.

  • updateAllPrices() and generateTradeOffers() looped all ~1000 Material values on every economy update. Both methods now only iterate materials actively tracked in SupplyData, reducing unnecessary CPU work.

  • DeliveryQuest.onReward() never gave emeralds — only sent a chat message. Emeralds are now added to the player's inventory (or dropped at their feet if the inventory is full).

  • Dead field VillagerNameManager.villageManagers — declared but never read or written. Removed.


Файлы

VillageAI-2.2.0.jar(79.28 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

2.1.1

Загрузчики

Bukkit
Paper
Purpur
Spigot

Версии игры

1.21–1.21.11

Загрузок

20

Дата публикации

2 нед. назад

Загрузил

ID версии

Главная