Version 1.12.1 : fixes, compatibility and updates
Some aspects of the plugin had not been updated for a long time, and this version updates many different aspects.
This release has not been tested with older versions of MC and backward compatibility is not guaranteed.
Thanks to
Melocet for his work.
- The current McVersionHandler parses (MC: 1.x.x) and breaks completely on (MC: 26.1.2). This rewrites version detection to handle both old (1.x.x) and new (26.x.x) formats, treating any major ≥ 26 as fully featured.
- Removed dead MVdWPlaceholderAPI dependency (repo.mvdw-software.be is offline).
- Removed deprecated APIs and pre-1.21 dead code paths.
- Reflection-based access to TimeSkipEvent.SkipReason (Paper 26.1.2 throws NoClassDefFoundError on direct reference).
- Null-safe config access in SleepHandler (PlayerJoin/Quit/ChangeWorld/BedEnter).
- Replaced bundled Metrics.java with shaded bstats-bukkit.
- Modern JsonParser.parseString() and URI-based URL construction.
SleepHandler
- Don't cancel PlayerBedEnterEvent in non-sleep worlds (Nether/End); the cancel was suppressing vanilla bed-explosion.
- Fix integer division in the playersSleepingPercentage check (spPercent / 100 was always 0); refactored to spNb * 100 >= rpNb * spPercent.
- Particle debug logs were using errorMsg with mismatched counts; switched to debugMsg with corrected counts.
- "UNKNOW" → "UNKNOWN" typo.
WorldListHandler
- Replaced fragile List<World>.toString() string-parser with direct World.getName() iteration. Previous parser broke on Paper toString format changes, stripping legitimately-loaded worlds from worldsList.
- Removed MainTM.waitTime(200) inside the strip loop (Thread.sleep on main thread, multiplied per world).
- Snapshot configured-world keys before iteration to avoid ConcurrentModificationException.
- Debug message printed the boolean eraseWorld instead of the world name.
- Fix #4 → #6 numbering jump.
LgFileHandler — defaultLang migration
Fresh installs (and installs upgrading from older versions) leave defaultLang: default in lang.yml, the placeholder language whose strings are
"Please ask an admin to properly define the default language...". checkDefLang() now treats both empty values and the literal default string as "unconfigured" and migrates them to pickFallbackLang() (returns en_US when present, otherwise the placeholder as last resort).
Build and compatibility
- Build: Java 21, latest Spigot 1.21.4 / Gson / bStats 3.1.0 / PAPI 2.11.6
- Tested on Paper 26.1.2 (1.21.x)