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

    beta29 апреля 2026 г.

    Added

    • API security control: allow_to_use_api config option (default: true) to prevent other plugins from accessing the API when set to false
    • IllegalStateException with clear message when API access is disabled

    Fixed

    • None

    Changed

    • None

    Removed

    • None
  • More Stable

    alpha24 апреля 2026 г.

    Added

    • Storage type change detection on reload - warns admin to restart server instead of loading mismatched data

    Fixed

    • MAX_MAPPINGS limit now trims oldest entries instead of only warning
    • YAML name fallback uses full UUID string instead of substring(0, 8) to prevent potential boundary issues

    Changed

    • lastStorageType field tracks storage type across reloads for change detection
  • Final fixes

    release23 апреля 2026 г.

    Added

    • Folia scheduler support with automatic fallback to Bukkit scheduler
    • SQLite ON CONFLICT detection for better UPSERT performance
    • UUID-based write locks for thread-safe player data operations
    • Player save queue (pendingSaves) to serialize async database writes per UUID
    • Offline player name caching to reduce I/O operations during batch processing
    • YAML save debouncing with resettable timer (scheduleYamlSave)
    • Atomic reference for nameToUUIDs and uuidToName maps for safe reload
    • Legacy YAML format detection and migration support (uuid: GAMEMODE)
    • Support for setting gamemode for players who have never joined the server
    • GamemodeChangeEvent custom event for API integration
    • -all, -online, -offline batch operation flags
    • Database transaction support for batch offline player updates
    • Automatic config.yml key merging with missing defaults preservation
    • Connection retry mechanism with configurable attempts and delay
    • Debug logging controlled by config option

    Fixed

    • NPE in onDisable() when storageType is not "yaml" and yamlCache is null
    • Race condition in onPlayerJoin where async save could overwrite recently set gamemode
    • SQL operation silent failure - now logs error after max retry attempts
    • Write lock timeout now logs debug message instead of failing silently
    • Skipped offline players during batch operations now logged with warning count
    • Config merge now properly adds missing keys without overwriting existing values
    • Migration now handles both legacy (flat) and modern (nested) YAML formats

    Changed

    • Replaced pendingSaves Set<String> with Map<UUID, CompletableFuture<Void>> for per-UUID queuing
    • Refactored tryWriteLock pattern into withWriteLock helper method
    • Optimized processOfflinePlayersData with name cache and early empty check
    • Cached UPSERT SQL generation to avoid repeated ON CONFLICT detection
    • Message placeholder replacement now uses Matcher.quoteReplacement() to escape $ and \
    • Folia reflection now uses Consumer.class with proper generic erasure handling
    • savePlayerModeDirect now updates memory cache immediately before async DB write
    • Batch migration now uses incremental executeBatch() to avoid memory issues

    Removed

    • Legacy yamlCache.set(uuid.toString(), mode.name()) flat format write
    • Redundant saveYamlCache() call when using database storage
    • Unused SAVE_DELAY field from earlier versions
  • Optimizations lol

    beta20 апреля 2026 г.

    Added

    • Added database connection retry mechanism with MAX_RETRY_ATTEMPTS (3) and RETRY_DELAY_MS (1000ms) for MySQL/SQLite.
    • Added ensureConnection() and reconnect() methods for automatic database connection recovery.
    • Added executeWithRetry(), executeUuidQueryWithRetry(), and executeVoidWithRetry() helper methods to wrap SQL operations with retry logic.
    • Added cross-server compatibility for offline player targeting: When a player name is not found in the local memory cache (nameToUUIDs), the plugin now queries the database directly via queryUuidByName().
    • Added -offline, -online, and -all flags to batch target processing.
    • Added PlayerQuitEvent handler to clean up playerLocks when a player disconnects, preventing potential memory leaks.
    • Added proper index creation handling (createIndexSafe) with fallback checks for MySQL vs SQLite metadata differences.
    • Added GamemodeChangeEvent custom event that is called when a player's gamemode is changed by the plugin.

    Fixed

    • Fixed database index creation to check for existing indexes before attempting CREATE INDEX to prevent SQL errors on MySQL.
    • Fixed onPlayerJoin event to use Optional for loadPlayerMode and properly handle null stored gamemodes without triggering unnecessary errors.
    • Fixed savePlayerMode to ensure player name is correctly updated in the database when saving gamemode.
    • Fixed setPlayerMode API method to handle exceptions and return false on failure rather than always returning true.
    • Fixed YAML caching to properly wrap saves in synchronized blocks to prevent concurrent modification issues.
    • Fixed loadData to properly populate nameToUUIDs and uuidToName mappings from both YAML and SQL storage.
    • Fixed handleSinglePlayer to check for player name in database when local cache misses, improving cross-server or bungeecord network support.
    • Fixed processOfflinePlayersData to use database batch operations for SQL storage instead of locking each player individually, greatly improving performance.

    Changed

    • Refactored database initialization to use a dedicated dbUrl, dbUser, and dbPass fields instead of constructing the connection string inline.
    • Updated loadPlayerMode to use executeWithRetry for robust SQL error handling and Optional<GameMode> return type.
    • Improved setPlayerGamemodeLocked logic to check player.isOnline() before scheduling tasks.
    • Enhanced handleGamemodeTarget to use async() for both batch and single player operations to avoid blocking the main thread.
    • Replaced explicit try-catch blocks with executeWithRetry wrappers in database operations for cleaner code.
    • Changed handleBatchPlayers and handleSinglePlayer to use sync() for sending messages to ensure thread safety.
    • Improved migrateFromYamlIfNeeded to handle ON DUPLICATE KEY UPDATE properly on MySQL.
    • Optimized processOfflinePlayersData to use batch SQL execution (executeBatch()) with BATCH_SIZE instead of individual updates.

    Removed

    • Removed tryReadLock(), unlockRead(), and withReadLock() methods as they were unused in the new version.
    • Removed saveAllSync() method as it was unused.
    • Removed direct Statement usage in initDatabase() in favor of try-with-resources and prepared statements.
    • Removed redundant player mode saving in onPlayerJoin (no longer forces save if gamemode didn't change).
    • Removed manual thread sleeping in processOfflinePlayersData for SQL storage, as batch processing handles this efficiently.
  • Major Change...

    alpha18 апреля 2026 г.

    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)
  • Optimizations

    release22 марта 2026 г.

    Added

    • Batch processing for offline player data with configurable BATCH_SIZE (default: 100) to prevent memory overflow when handling large datasets
    • Centralized constant declarations (SAVE_DELAY, MAX_MAPPINGS, BATCH_SIZE, LOCK_TIMEOUT, SHUTDOWN_TIMEOUT) for better maintainability

    Fixed

    • Potential performance issue where offline player data was processed without pagination, causing high memory usage
    • Redundant BatchResult inner class replaced with local variables for cleaner code structure

    Changed

    • Optimized processOfflinePlayersData method to process keys in batches instead of all at once
    • Simplified handleBatchPlayers method by removing unnecessary BatchResult wrapper class
    • Streamlined code formatting: compressed multi-line conditionals into single lines where appropriate
    • Improved code readability with consistent constant usage across all methods

    Removed

    • Redundant BatchResult inner class (functionality replaced with local variables)
    • Hardcoded thread pool size value (now using THREAD_POOL_SIZE constant)
  • Fixes...

    beta27 февраля 2026 г.

    Added

    • Added debug logging for lock timeouts and interruptions
    • Added pendingSaves set to prevent multiple concurrent save operations

    Changed

    • Improved Folia scheduler fallback logic: sync tasks now use Bukkit scheduler instead of direct run() to prevent main thread blocking
    • Enhanced version detection to properly handle 1.8.8 format

    Fixed

    • Fixed potential main thread blocking when Folia scheduling fails
    • Fixed lock timeout handling with proper debug logging for easier troubleshooting
    • Fixed duplicate data saving by implementing pending saves tracking with ConcurrentHashMap.newKeySet()
    • Fixed version parsing for formats like 1.8.8
  • Completly Optimized!

    alpha26 февраля 2026 г.

    Added

    • Added comprehensive thread-safe locking mechanism using ReentrantLock for player data
    • Added support for Folia server software with unified scheduling API
    • Added debug mode with detailed logging for troubleshooting
    • Added maximum mappings limit (10,000) to prevent memory leaks
    • Added delayed save system (20 ticks) to batch disk writes
    • Added batch processing commands: /gamemode -all, -online, -offline
    • Added server version detection for spectator mode compatibility
    • Added configuration auto-merge to keep config.yml up-to-date
    • Added proper error handling with stack traces in debug mode
    • Added player quit event handling to clean up locks

    Changed

    • Complete architecture rewrite with modular design
    • Migrated from coarse synchronized blocks to fine-grained ReentrantLock
    • Improved thread management: replaced scattered async calls with centralized 4-thread pool
    • Enhanced name-to-UUID mapping with bidirectional cache (uuidToName + nameToUUIDs)
    • Optimized data saving: from immediate writes to delayed batch saving
    • Unified task scheduling for Bukkit and Folia platforms
    • Improved command tab completion with offline player suggestions
    • Refactored permission system with granular control (xgamemode.admin, xgamemode.others.*)
    • Enhanced logging with color-coded console messages
    • Restructured message system with better fallback support

    Fixed

    • Fixed thread safety issues in name-to-UUID mappings
    • Fixed memory leak where player data never got cleaned up
    • Fixed data loss risk from frequent uncoordinated saves
    • Fixed incorrect console sender usage in logo display
    • Fixed spectator mode detection on older server versions
    • Fixed race conditions in player join event handling
    • Fixed improper synchronization in data file access
    • Fixed tab completion showing duplicate entries
    • Fixed permission checks for offline player modifications

    Removed

    • Removed excessive synchronized blocks causing performance bottlenecks
    • Removed redundant saveData() calls after every player join
    • Removed unsafe HashSet usage in concurrent mappings
    • Removed mixed tab/space indentation (now using consistent spaces)
    • Removed deprecated scheduler implementations

    I won't be sad when the final JAR file is big anymore! Stable > Everything! Screw you, JAR size!

  • 4.3-rls

    release2 февраля 2026 г.
    • Optimized the plugin.
  • 4.3-beta

    beta4 июля 2025 г.

    [x] Fixed the bug that cause error when closing the server.

  • 4.3-alpha

    alpha25 мая 2025 г.

    [+] Added 1.8.X mode

    [x] Optimized Tab Completer

  • 4.2-Release

    release5 мая 2025 г.

    [+] Added

    Supports to 1.9.X ~ 1.10.X.

    [x] Optimized

    Optimized Performance.

  • 4.1-Release

    release1 мая 2025 г.

    [+] Added

    show_logo: true/false
    

    Show logo or not when plugin enabled.


    [x] Optimized

    Optimized Performance.

  • New Generations : 4.0-Release

    release6 апреля 2025 г.

    Fixed the issue where lang settings could not be changed

    I uploaded the Release version without checking the plugin functionality, which was my negligence. I hereby apologize to all users affected by the above issues. SORRY ABOUT THAT!

    Optimized performance

    Readded Invalid Playername Check

    Supported 1.11+

    Removed oii-aio

  • 3.9-Release

    release4 апреля 2025 г.

    A huge of performance improve

    JAR size improve

    Bug fixes

  • 3.8-Release

    release29 марта 2025 г.

    Fixed bug where XGamemode not working on Folia

    Added Check Legal Player Name

    Improved performance a lot!

    Hope you enjoy it!

  • 3.8-beta-fix

    beta19 марта 2025 г.

    Fixed bug about Auto-Fix config

  • 3.8-beta

    beta19 марта 2025 г.

    Optimized size and performance and data secure

  • 3.8-alpha

    alpha18 марта 2025 г.

    Performance optimize and a HUGE size optimize

    (I didn't use ProGuard this time!)

  • 3.7-Release

    release2 марта 2025 г.

    Optimized size and fixed bugs

1

Совместимость

Сведения

Лицензия:
Опубликован:1 год назад
Обновлён:1 месяц назад
ID проекта:
Главная