Package com.enhancedechest.listener
Class JoinMigrationListener
java.lang.Object
com.enhancedechest.listener.JoinMigrationListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Auto-migrates un-migrated players on join when migration mode is ON.
This is the primary path for online player migration; admin commands trigger the same service.
The isMigrated pre-check runs on the DbExecutor — never on the join thread — so
on a server where (almost) everyone is already migrated, a join costs zero main-thread DB time even
during a mass reconnect after a restart. Only the rare not-yet-migrated player proceeds into
MigrationService.migrateOnline(org.bukkit.entity.Player), which does its own thread hops and runs its DB write phase
under the session manager's per-chest exclusivity — so a player racing a /ec open against
this check simply waits behind the migration instead of clobbering it (see the service's Javadoc).
The service also re-checks the flag inside that exclusive phase, so racing this pre-check (double
join, concurrent admin /ee migrate) can never migrate twice.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JoinMigrationListener
public JoinMigrationListener()
-
-
Method Details
-
onJoin
public void onJoin(org.bukkit.event.player.PlayerJoinEvent event)
-