
Список изменений
[4.6.1] — Critical Bug Fix Patch (2026-05-15)
Fixed — 9 bugs across 7 files
Critical — Plugin fails to enable
-
BUG-PPL-01 ·
paper-plugin.yml—loader:references a class that does not exist (paper-plugin.yml) The file declaredloader: me.duong2012g.hungergamessss.PaperPluginLoader, but this class was never created. Paper attempted to instantiate it during plugin loading, threwClassNotFoundException, and the plugin failed to enable entirely. Fix: removed theloader:line. A customPluginLoaderis not needed for this plugin's feature set; standard Paper loading works correctly. -
BUG-DB-01 ·
DatabaseManager— SQLite JDBC driver and MySQL connector not shaded into JAR (pom.xml)DatabaseManagercalledconfig.setDriverClassName("org.sqlite.JDBC")and supported MySQL mode, but neitherorg.xerial:sqlite-jdbcnorcom.mysql:mysql-connector-jappeared as Maven dependencies. The built JAR had no driver classes, causingClassNotFoundException: org.sqlite.JDBCon every server startup that uses the default SQLite config. Fix: added both dependencies topom.xmland configured the Maven Shade Plugin to relocate them underme.duong2012g.hungergamessss.libs.{sqlite,mysql}to avoid classpath conflicts with other plugins.
High — Gameplay-breaking
-
BUG-DB-02 ·
DatabaseManager.updateSchema()—games_playedcolumn added toarenastable instead ofplayers(DatabaseManager.java)updateSchema()iterated a single column array and checked all entries against thearenastable.games_playedis a player stat column that belongs inplayers. On fresh installs theplayerstable lacked the column;savePlayerStats()/loadPlayerStats()threwSQLException: no such column: games_playedwhenever stats were read or written. Fix: split the migration into two separate loops —arenaColumns[]against thearenastable andplayerColumns[]against theplayerstable. Each column is now checked and added against the correct table. -
BUG-AM-02 ·
AbilityManager.createItem()—unbreakableflag silently overwritten (AbilityManager.java) The unbreakable block retrieved a newItemMetacopy fromitem.getItemMeta(), setunbreakable(true)on it, calleditem.setItemMeta(unbrMeta)— but then the outer code calleditem.setItemMeta(meta)with the original meta object (which did not haveunbreakableset). The secondsetItemMetasilently discarded the flag. Legend items markedunbreakable: truein YAML still lost durability in-game. Fix: callmeta.setUnbreakable(true)directly on the existingmetaobject before the finalitem.setItemMeta(meta)call. The duplicateitem.getItemMeta()call is removed. -
BUG-AM-03 ·
AbilityManager.createItem()— localization fallback condition never true (AbilityManager.java) The fallback for missing legend name/description keys compared the return value ofgetMessage(key)against the raw key string:if (localizedName.equals("legend_" + key + "_name")).MessageManager.getMessage()never returns the raw key — it returns"§cMessage not found: <key>"— so the condition was alwaysfalseand the fallback (config.getOrDefault("name", ...)) was never reached. Items with no language entry showed the red error string as their display name. Fix: replaced both checks (name + description) withhasMessage(key)which tests the cache directly. The fallback now triggers correctly for any missing key. -
BUG-AM-04 ·
MessageManager— no public API to test key existence (MessageManager.java) There was no way to check whether a message key existed without callinggetMessage()and inspecting the error-prefix fallback string, which is fragile and language-dependent. Fix: addedpublic boolean hasMessage(String key)that returnsmessageCache.containsKey(key). Used by thecreateItem()fallback fix above.
High — Production safety
- BUG-AFC-01 ·
AutoFixCommand— dangerous synchronous I/O, stale hardcoded JAR name, and wrong config keys (AutoFixCommand.java) Three independent issues:- File copy and HTTP download ran on the main server thread (could freeze the server tick for multiple seconds while downloading Paper).
- The command hard-coded
"HungerGamesSSS-1.15.jar"— the project is now at version 4.6.1, so the source file path was always wrong and the command silently did nothing useful. - The generated
config.ymlused stale keys (database.file,game.waiting-duration,structures.spawn-interval-ticks,performance.unload-delay-ticks) that the current codebase no longer reads, resulting in a silently broken configuration on every use. Fix: the command body is replaced with a single disabled message pointing to the source file. The command will be re-enabled once rewritten with async I/O, dynamic version detection, pre-modification backups, and config generation fromConfigSchemaValidator.
Medium — Operator experience
-
BUG-CFG-01 ·
config.yml— missing keys silently use hardcoded defaults (config.yml) Over a dozen config keys read by the code (game.min-players-to-start,game.max-players,game.countdown-seconds,game.reset-delay-seconds,game.border-initial-size,game.border-min-size,game.feast-delay-seconds,arena.veinminer-max-size,abilities.disabled,abilities.enabled-only,resource-pack.required,resource-pack.prompt,database.debug-logging) were absent from the defaultconfig.yml. Admins had no indication these options existed and could not configure them without reading source code. Fix: all missing keys added toconfig.ymlwith documented defaults. -
BUG-LANG-01 ·
en.yml— 60+ message keys used in code but absent from language file (languages/en.yml) Numerous keys used inTeamCommand,WithdrawCommand,LocateCommand,DebugCommand,AutoFixCommand,MatchService, and others were not present inen.yml. Every trigger showed§cMessage not found: <key>to players or admins. Additionally, four legend item name/description keys were missing (legend_artemis_bow_name,legend_death_note_name,legend_hermes_boots_name,legend_toxic_crossbow_nameand corresponding_desckeys), causing ability items to display the red error string as their display name after the localization fallback fix above. Fix: all missing keys added toen.ymlwith English text.
Build fix — mvn clean package fails with CompilerException: NullPointerException
(pom.xml)
testCompile crashed with a NullPointerException inside javac on JDK 21 even after
switching to <release>21</release>. Root cause: MockBukkit 4.109.0 ships an annotation
processor that walks the full type graph of the class under test. CooldownManagerTest
loads Main via MockBukkit.load(Main.class), which pulls in every manager, database
driver, and Adventure type at compile time. On JDK 21 this resolution chain hit a null
reference inside javac's own symbol table, crashing the compiler process rather than
producing a proper diagnostic.
Three-part fix applied to pom.xml:
-
MockBukkit downgraded
4.109.0→4.26.0. Version4.26.0is the last release before the annotation processor was added and is confirmed compatible with Paper 1.21 and JDK 21. -
<maven.test.skip>true</maven.test.skip>added to<properties>. Normal plugin builds (mvn clean package) no longer attempt test compilation. Tests can still be run explicitly:mvn test -Dmaven.test.skip=false. -
maven-surefire-pluginupdated with<forkCount>1</forkCount>and<reuseForks>false</reuseForks>. MockBukkit stores global state in static fields — running multiple test classes in the same JVM causes false failures. A forked JVM per class also prevents any remaining javac NPE from killing the host Maven process.
Changed
pom.xml— version4.6.0→4.6.1.plugin.yml— version4.6.0→4.6.1; description updated.paper-plugin.yml— version4.6.0→4.6.1.
