
Team-HomeGUI Plugin
A lightweight team system with team homes, private team chat, personal homes, and a clean home GUI
Список изменений
[1.2.0] — Bug Fix Release
Fixed
🔴 Critical
-
HomeManager/TeamManager—save()not synchronized → homes/teams lost on server shutdownsaveAsync()dispatches aBukkitRunnableto a worker thread. When the server stops,onDisable()callssave()on the main thread while that worker thread may still be executing a previoussave(). BecauseYamlConfigurationis not thread-safe, the two threads interleaved theirdata.set(…)anddata.save(…)calls, producing a corrupted or empty file. The result was that all personal homes (and team data) were silently wiped every time the server restarted. Bothsave()methods are nowsynchronized. Additionally,onDisable()callsgetScheduler().cancelTasks(this)before saving, eliminating the race window entirely. -
HomeService.getPlayerMaxHomes()— wrong config key → home limit always 2 The method readsettings.default-max-homesbut the actual key inhome-config.ymlisdefault-max-homes(root level, nosettingsprefix). The missing prefix causedgetInt()to always fall back to its hardcoded default of2, capping every player at two homes regardless of what was configured. Fixed to read the correct keydefault-max-homes.
🟡 Medium
-
HomeService.teleportHome()— wrong path and wrong type fordisabled-worlds→ world blacklist never enforced via GUIgetString("settings.disabled-worlds", "")was wrong on two counts: the path prefixsettings.does not exist inhome-config.yml, and the value is a YAML list, not a plain string. The method always received an empty string and silently skipped the world check entirely, allowing players to teleport intoworld_netherandworld_the_endthrough the GUI regardless of the blacklist. Fixed to usegetStringList("disabled-worlds")at the correct root path. -
HomeHandler.handlePlayerSetHome()—player.getLocation()not cloned before storagehomeManager.setHome(…, player.getLocation())stored a direct reference to Bukkit's mutableLocationobject. Bukkit may reuse this object internally, meaning the stored coordinates could silently change after the call. Fixed by passingplayer.getLocation().clone()instead. (HomeService.setHome()already cloned correctly; this aligns the two code paths.)
Changed
- Version bumped
1.1.0 → 1.2.0.

