Unofficial site, not affiliated with modrinth.com.What is this?
Плагины/XGamemode
XGamemode

XGamemode

You're not switching modes, you're switching dimensions.

2.0K
4
Все версииMajor Change...

Major Change...

Alpha2 нед. назад

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

Added

  • Multi-storage support with automatic migration (YAML, SQLite, MySQL)
  • Database connection pooling preparation structure
  • Automatic YAML to database migration on first load
  • Fallback mechanism to YAML when database connection fails
  • ReadWriteLock implementation for finer-grained concurrency control
  • Separate read/write lock methods (tryReadLock, tryWriteLock, unlockRead, unlockWrite)
  • withReadLock and withWriteLock helper methods for cleaner lock management
  • Comprehensive API methods with CompletableFuture return types (getPlayerMode, setPlayerMode)
  • Custom GamemodeChangeEvent for third-party plugin integration
  • Static Main.getInstance() API accessor
  • Dedicated savePlayerMode and loadPlayerMode methods with storage abstraction
  • saveAllSync method for batch YAML persistence
  • closeStorage method for proper database connection cleanup
  • Storage type logging on startup when debug mode is enabled
  • Player lock map initialization with ReentrantReadWriteLock
  • Database index creation for player name lookups with fallback for SQLite compatibility

Fixed

  • Lock ownership checking before unlocking to prevent IllegalMonitorStateException
  • Thread interruption handling in lock timeout scenarios with proper flag restoration
  • Concurrent modification safety in batch player processing
  • Data consistency between online player state and persistent storage
  • Proper thread interruption propagation during executor shutdown
  • Offline player name resolution fallback chain
  • UUID validation with proper exception handling for malformed entries
  • Batch processing now includes invalid entry removal and reporting
  • YAML cache synchronization issues with synchronized blocks
  • Pending save deduplication using ConcurrentHashMap.newKeySet()

Changed

  • Storage backend from single YAML file to pluggable architecture (YAML/SQLite/MySQL)
  • Lock mechanism from ReentrantLock to ReentrantReadWriteLock for improved read concurrency
  • Database operations execute asynchronously with prepared statements
  • Player mode saving now includes timestamp field for future audit capabilities
  • Data file renamed from data.yml to structured format with separate name and gamemode fields
  • Configuration now supports storage section with type, MySQL credentials, and connection parameters
  • Migration process creates .bak backup of original YAML file
  • handleGamemodeTarget split into handleBatchPlayers and handleSinglePlayer for clarity
  • processOfflinePlayersData now returns PlayerDataResult with changed and removed counts
  • Lock acquisition timeout reduced from lock-per-operation to centralized timeout constant
  • saveDataAsync and saveDataSync replaced with storage-aware savePlayerMode and savePlayerModeLocked
  • Executor service now uses fixed thread pool of 4 instead of cached pool
  • detectServerVersion method removed as no longer needed for SPECTATOR detection
  • Database connection uses MySQL connection parameters (useSSL=false, serverTimezone=UTC, autoReconnect=true)
  • YAML cache field renamed from dataConfig to yamlCache for clarity

Removed

  • PlayerDataResult inner class (functionality merged into improved batch processing)
  • serverMinorVersion field and version-specific SPECTATOR availability checking
  • saveDataSync direct public method (replaced by saveYamlCache)
  • updateMapping standalone method (merged into player join event handling)
  • processPlayerSet helper method (consolidated into main processing flow)
  • Direct dataConfig field exposure (now accessed through synchronized yamlCache)
  • Inline database connection string building (moved to dedicated initDatabase method)
  • Redundant gamemode name storage in YAML root level (now only stored in structured format)

Файлы

XGamemode-4.5-alpha.jar(17.40 KiB)
Основной
Скачать

Метаданные

Канал релиза

Alpha

Номер версии

4.5-alpha

Загрузчики

Bukkit
Folia
Paper
Purpur
Spigot

Версии игры

1.7.10–26.1.2

Загрузок

8

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

2 нед. назад

Загрузил

ID версии

Главная