4.6-rlslatestCompletingAug 24, 2026 Added
- Editable gamemode names - now there are keys likesurvivalin the config and you can edit the name of the gamemodes. - Ignore default gamemode node - if a player has it, the default gamemode won't apply on this player. Thanks to the feedback from @不是阿风喵!Changed
- (nothing)Fixed
- (nothing)Removed
- (nothing)4.6-betaAPI SecurityApr 29, 2026 Added
- API security control:allow_to_use_apiconfig option (default: true) to prevent other plugins from accessing the API when set to false -IllegalStateExceptionwith clear message when API access is disabledFixed
- NoneChanged
- NoneRemoved
- None4.6-alphaMore StableApr 24, 2026 Added
- Storage type change detection on reload - warns admin to restart server instead of loading mismatched dataFixed
-MAX_MAPPINGSlimit now trims oldest entries instead of only warning - YAML name fallback uses full UUID string instead ofsubstring(0, 8)to prevent potential boundary issuesChanged
-lastStorageTypefield tracks storage type across reloads for change detection4.5-rlsFinal fixesApr 23, 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 fornameToUUIDsanduuidToNamemaps for safe reload - Legacy YAML format detection and migration support (uuid: GAMEMODE) - Support for setting gamemode for players who have never joined the server -GamemodeChangeEventcustom event for API integration --all,-online,-offlinebatch 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 optionFixed
- NPE inonDisable()whenstorageTypeis not"yaml"andyamlCacheis null - Race condition inonPlayerJoinwhere 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 formatsChanged
- ReplacedpendingSavesSet<String>withMap<UUID, CompletableFuture<Void>>for per-UUID queuing - RefactoredtryWriteLockpattern intowithWriteLockhelper method - OptimizedprocessOfflinePlayersDatawith name cache and early empty check - Cached UPSERT SQL generation to avoid repeated ON CONFLICT detection - Message placeholder replacement now usesMatcher.quoteReplacement()to escape$and\- Folia reflection now usesConsumer.classwith proper generic erasure handling -savePlayerModeDirectnow updates memory cache immediately before async DB write - Batch migration now uses incrementalexecuteBatch()to avoid memory issuesRemoved
- LegacyyamlCache.set(uuid.toString(), mode.name())flat format write - RedundantsaveYamlCache()call when using database storage - UnusedSAVE_DELAYfield from earlier versions4.5-betaOptimizations lolApr 20, 2026 Added
- Added database connection retry mechanism withMAX_RETRY_ATTEMPTS(3) andRETRY_DELAY_MS(1000ms) for MySQL/SQLite. - AddedensureConnection()andreconnect()methods for automatic database connection recovery. - AddedexecuteWithRetry(),executeUuidQueryWithRetry(), andexecuteVoidWithRetry()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 viaqueryUuidByName(). - Added-offline,-online, and-allflags to batch target processing. - AddedPlayerQuitEventhandler to clean upplayerLockswhen a player disconnects, preventing potential memory leaks. - Added proper index creation handling (createIndexSafe) with fallback checks for MySQL vs SQLite metadata differences. - AddedGamemodeChangeEventcustom 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 attemptingCREATE INDEXto prevent SQL errors on MySQL. - FixedonPlayerJoinevent to useOptionalforloadPlayerModeand properly handle null stored gamemodes without triggering unnecessary errors. - FixedsavePlayerModeto ensure player name is correctly updated in the database when saving gamemode. - FixedsetPlayerModeAPI method to handle exceptions and returnfalseon failure rather than always returningtrue. - Fixed YAML caching to properly wrap saves insynchronizedblocks to prevent concurrent modification issues. - FixedloadDatato properly populatenameToUUIDsanduuidToNamemappings from both YAML and SQL storage. - FixedhandleSinglePlayerto check for player name in database when local cache misses, improving cross-server or bungeecord network support. - FixedprocessOfflinePlayersDatato use database batch operations for SQL storage instead of locking each player individually, greatly improving performance.Changed
- Refactored database initialization to use a dedicateddbUrl,dbUser, anddbPassfields instead of constructing the connection string inline. - UpdatedloadPlayerModeto useexecuteWithRetryfor robust SQL error handling andOptional<GameMode>return type. - ImprovedsetPlayerGamemodeLockedlogic to checkplayer.isOnline()before scheduling tasks. - EnhancedhandleGamemodeTargetto useasync()for both batch and single player operations to avoid blocking the main thread. - Replaced explicittry-catchblocks withexecuteWithRetrywrappers in database operations for cleaner code. - ChangedhandleBatchPlayersandhandleSinglePlayerto usesync()for sending messages to ensure thread safety. - ImprovedmigrateFromYamlIfNeededto handleON DUPLICATE KEY UPDATEproperly on MySQL. - OptimizedprocessOfflinePlayersDatato use batch SQL execution (executeBatch()) withBATCH_SIZEinstead of individual updates.Removed
- RemovedtryReadLock(),unlockRead(), andwithReadLock()methods as they were unused in the new version. - RemovedsaveAllSync()method as it was unused. - Removed directStatementusage ininitDatabase()in favor of try-with-resources and prepared statements. - Removed redundant player mode saving inonPlayerJoin(no longer forces save if gamemode didn't change). - Removed manual thread sleeping inprocessOfflinePlayersDatafor SQL storage, as batch processing handles this efficiently.4.5-alphaMajor Change...Apr 18, 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) -withReadLockandwithWriteLockhelper methods for cleaner lock management - Comprehensive API methods withCompletableFuturereturn types (getPlayerMode,setPlayerMode) - CustomGamemodeChangeEventfor third-party plugin integration - StaticMain.getInstance()API accessor - DedicatedsavePlayerModeandloadPlayerModemethods with storage abstraction -saveAllSyncmethod for batch YAML persistence -closeStoragemethod for proper database connection cleanup - Storage type logging on startup when debug mode is enabled - Player lock map initialization withReentrantReadWriteLock- Database index creation for player name lookups with fallback for SQLite compatibilityFixed
- Lock ownership checking before unlocking to preventIllegalMonitorStateException- 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 withsynchronizedblocks - Pending save deduplication usingConcurrentHashMap.newKeySet()Changed
- Storage backend from single YAML file to pluggable architecture (YAML/SQLite/MySQL) - Lock mechanism fromReentrantLocktoReentrantReadWriteLockfor improved read concurrency - Database operations execute asynchronously with prepared statements - Player mode saving now includes timestamp field for future audit capabilities - Data file renamed fromdata.ymlto structured format with separatenameandgamemodefields - Configuration now supportsstoragesection with type, MySQL credentials, and connection parameters - Migration process creates.bakbackup of original YAML file -handleGamemodeTargetsplit intohandleBatchPlayersandhandleSinglePlayerfor clarity -processOfflinePlayersDatanow returnsPlayerDataResultwith changed and removed counts - Lock acquisition timeout reduced from lock-per-operation to centralized timeout constant -saveDataAsyncandsaveDataSyncreplaced with storage-awaresavePlayerModeandsavePlayerModeLocked- Executor service now uses fixed thread pool of 4 instead of cached pool -detectServerVersionmethod removed as no longer needed for SPECTATOR detection - Database connection uses MySQL connection parameters (useSSL=false, serverTimezone=UTC, autoReconnect=true) - YAML cache field renamed fromdataConfigtoyamlCachefor clarityRemoved
-PlayerDataResultinner class (functionality merged into improved batch processing) -serverMinorVersionfield and version-specific SPECTATOR availability checking -saveDataSyncdirect public method (replaced bysaveYamlCache) -updateMappingstandalone method (merged into player join event handling) -processPlayerSethelper method (consolidated into main processing flow) - DirectdataConfigfield exposure (now accessed through synchronizedyamlCache) - Inline database connection string building (moved to dedicatedinitDatabasemethod) - Redundant gamemode name storage in YAML root level (now only stored in structured format)4.4-rlsOptimizationsMar 22, 2026 Added
- Batch processing for offline player data with configurableBATCH_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 maintainabilityFixed
- Potential performance issue where offline player data was processed without pagination, causing high memory usage - RedundantBatchResultinner class replaced with local variables for cleaner code structureChanged
- OptimizedprocessOfflinePlayersDatamethod to process keys in batches instead of all at once - SimplifiedhandleBatchPlayersmethod by removing unnecessaryBatchResultwrapper class - Streamlined code formatting: compressed multi-line conditionals into single lines where appropriate - Improved code readability with consistent constant usage across all methodsRemoved
- RedundantBatchResultinner class (functionality replaced with local variables) - Hardcoded thread pool size value (now usingTHREAD_POOL_SIZEconstant)4.4-betaFixes...Feb 27, 2026 Added
- Added debug logging for lock timeouts and interruptions - AddedpendingSavesset to prevent multiple concurrent save operationsChanged
- Improved Folia scheduler fallback logic: sync tasks now use Bukkit scheduler instead of directrun()to prevent main thread blocking - Enhanced version detection to properly handle 1.8.8 formatFixed
- 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 withConcurrentHashMap.newKeySet()- Fixed version parsing for formats like 1.8.84.4-alphaCompletly Optimized!Feb 26, 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 locksChanged
- 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 supportFixed
- 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 modificationsRemoved
- 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-rlsFeb 2, 2026 - Optimized the plugin.4.3-betaJul 4, 2025 [x] Fixed the bug that cause error when closing the server.4.3-alphaMay 25, 2025 [+] Added 1.8.X mode [x] Optimized Tab Completer4.2-ReleaseMay 5, 2025 [+] Added Supports to 1.9.X ~ 1.10.X. [x] Optimized Optimized Performance.4.1-ReleaseMay 1, 2025 [+] Added
Show logo or not when plugin enabled. --- [x] Optimized Optimized Performance.show_logo: true/false4.0-ReleaseNew Generations : 4.0-ReleaseApr 6, 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-ReleaseApr 4, 2025 A huge of performance improve JAR size improve Bug fixes3.8-ReleaseMar 29, 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-fixMar 19, 2025 Fixed bug about Auto-Fix config3.8-betaMar 19, 2025 Optimized size and performance and data secure3.8-alphaMar 18, 2025 Performance optimize and a HUGE size optimize (I didn't use ProGuard this time!)3.7-ReleaseMar 2, 2025 Optimized size and fixed bugs3.7-betaMar 1, 2025 Added log3.7-alphaFeb 28, 2025 Used Java 8 not Java 17 Optimized size3.6-ReleaseFeb 28, 2025 Fixed the bug where the _console cannot change the offline player gamemode_ Optimized size to almost less then 10KB3.6-betaFeb 28, 2025 Fixed _~~many bugs~~_ about Auto-Fix Optimized size and performance3.63.6-alphaFeb 21, 2025 _~~Fixed many bugs~~_ Optimized size and performance3.53.5-ReleaseFeb 17, 2025 Optimized Size & Performance! _~~Fixed many bugs~~_3.4Feb 14, 2025 _~~Fixed All Bugs I Found...again~~_ _( · v . )_ Added oii-aio Language3.3Feb 12, 2025 _~~Fixed All Bugs I Found! qwq~~_ Optimized Performance and JAR Size to 10.1 KB.3.2Feb 10, 2025 Fixed Many Bugs on Spigot Not Optimized yet _(I mean size not performance)_ So the JAR is huge (12KB) Uh, I'll optimize it in V3.3.3.1Feb 7, 2025 Improved Performance Improved Auto-Fix3.0Feb 6, 2025 Added Auto-Fix for config.yml! Added Multi-Language Supports!2.9Feb 5, 2025 _Better_ Performance!2.8Feb 3, 2025 _~~Fixed All Known Bugs!~~_2.7Feb 2, 2025 **_Fixed many bugs_**2.6Feb 2, 2025 _Fixed many bugs_2.5Feb 1, 2025 Fixed many bugs. _(SORRY ABOUT THAT)_ Added Default Gamemode in config.yml2.4Feb 1, 2025 Supports Folia Now! Added /gm <mode> -all/-online/-offline Added data.yml so you can edit the gamemode for offline player. Improved Performance.2.3Jan 30, 2025 Supports 1.13 & 1.13+ now! Added /xgm about2.2Jan 24, 2025 Added /xgamemode Added Auto-Complete2.1Jan 24, 2025 Added /xgamemode reload Added /gamemode <mode> [player] Added /gm1.0Jan 23, 2025 Plugin is done!
Similar projects
Plugin →VeinMiner
Mine the whole vein on mining a single ore/block. Make the tedious mining experience to something satisfying and fun! FTB Ultimine alternative
99.3MSueta
Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
Chunky
Pre-generates chunks, quickly and efficiently
18.4MSueta
VeinMiner Enchantment
Veinminer Addon - Adds vineminer enchantment to enchanting tables. Only tools with the enchantment can veinmine
18MSueta
WorldEdit
A Minecraft Map Editor... that runs in-game! With selections, schematics, copy and paste, brushes, and scripting. Use it in creative, or use it temporarily in survival.
11.6MSueta
LuckPerms
A permissions plugin/mod for Minecraft servers.
2.8MSueta