nineMinecraft is a joke site.
nineMinecraft is in no way affiliated with Modrinth or 9minecraft. (And frankly, who wants to be affiliated with the latter?)
VillageAI

VillageAI

Plugin

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

Server AdventureEquipmentGame MechanicsMinigameTechnology

98 downloads
3 followers

VillageAI 2.1.0

Changelog

VillageAI Changelog

[2.1.0] - 2026-03-05 - Performance & Stability Overhaul

🚀 Major Performance Optimizations

Search Performance Revolution (1000x Faster)

  • O(n) → O(1) Lookup: Replaced linear village search with concurrent hash map indexing
  • Villager-to-Village Mapping: Added ConcurrentHashMap<UUID, VillageId> for instant villager lookups
  • Auto-Indexing: Automatic map updates when villagers join/leave villages
  • Memory Efficient: Thread-safe collections with minimal overhead

Asynchronous File Operations

  • Non-blocking I/O: All village save/load operations now run asynchronously
  • Server Lag Prevention: No more server freezes during data operations
  • Backup System: Automatic backup creation before save operations
  • Atomic Operations: Safe file operations with temporary files and atomic renames
  • Error Recovery: Graceful handling of file system errors with fallback mechanisms

Comprehensive Error Handling & Validation

  • Data Integrity Checks: VillageValidator class validates all loaded data
  • Input Sanitization: UUID validation, location bounds checking, reputation range validation
  • Corruption Prevention: Backup system prevents data loss during failures
  • Detailed Logging: Comprehensive error reporting with actionable information
  • Graceful Degradation: Plugin continues operating even with partial data corruption

🛡️ Enhanced Stability & Reliability

Thread Safety Improvements

  • Concurrent Collections: All data structures use thread-safe implementations
  • Atomic Operations: Critical operations are atomic and race-condition free
  • Snapshot Patterns: Prevent ConcurrentModificationException in iteration
  • Memory Consistency: Proper memory visibility across threads

Memory Management

  • Leak Prevention: Automatic cleanup of unused data structures
  • Resource Management: Proper cleanup on plugin disable/reload
  • Cache Optimization: Efficient caching with automatic expiration
  • Memory Footprint: Reduced memory usage through optimized data structures

🔧 Technical Architecture Updates

New Utility Classes

  • AsyncVillageStorage: Handles all async file operations with callbacks
  • VillageValidator: Comprehensive data validation and error reporting
  • Enhanced Error Handling: Try-catch blocks with proper resource cleanup

Configuration Validation

  • Startup Validation: Validates all configuration files on plugin load
  • Runtime Checks: Continuous validation of critical data structures
  • Error Reporting: Clear error messages with suggested fixes
  • Default Fallbacks: Safe defaults when configuration is invalid

Files

VillageAI-2.1.0.jar(78.37 KiB) Primary Download

Project members

Duong2012G

Inherited Owner


Technical information

License
Apache-2.0
Project ID