File tree Expand file tree Collapse file tree
cloud-bukkit/src/main/java/org/incendo/cloud/bukkit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import org .bukkit .event .EventHandler ;
2727import org .bukkit .event .EventPriority ;
2828import org .bukkit .event .Listener ;
29+ import org .bukkit .event .player .AsyncPlayerPreLoginEvent ;
2930import org .bukkit .event .server .PluginDisableEvent ;
3031import org .checkerframework .checker .nullness .qual .NonNull ;
31- import org .spigotmc .event .player .PlayerSpawnLocationEvent ;
3232
3333final class CloudBukkitListener <C > implements Listener {
3434
@@ -39,11 +39,11 @@ final class CloudBukkitListener<C> implements Listener {
3939 }
4040
4141 @ EventHandler (priority = EventPriority .MONITOR , ignoreCancelled = true )
42- void onPlayerLogin (final @ NonNull PlayerSpawnLocationEvent event ) {
42+ void onPlayerLogin (final @ NonNull AsyncPlayerPreLoginEvent event ) {
4343 /* If the server is brigadier-capable, any registration after players
4444 have joined (and been sent a command tree) is unsafe.
4545 Bukkit's PlayerJoinEvent is called just after the command tree is sent,
46- so we have to perform this state change at PlayerSpawnLocationEvent to lock before that happens. */
46+ so we have to perform this state change at AsyncPlayerPreLoginEvent to lock before that happens. */
4747 this .bukkitCommandManager .lockIfBrigadierCapable ();
4848 }
4949
You can’t perform that action at this time.
0 commit comments