diff --git a/cloud-bukkit/src/main/java/org/incendo/cloud/bukkit/CloudBukkitListener.java b/cloud-bukkit/src/main/java/org/incendo/cloud/bukkit/CloudBukkitListener.java index 171a06af..c8ba9b02 100644 --- a/cloud-bukkit/src/main/java/org/incendo/cloud/bukkit/CloudBukkitListener.java +++ b/cloud-bukkit/src/main/java/org/incendo/cloud/bukkit/CloudBukkitListener.java @@ -26,7 +26,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerSpawnLocationEvent; import org.bukkit.event.server.PluginDisableEvent; import org.checkerframework.checker.nullness.qual.NonNull; @@ -40,11 +40,11 @@ final class CloudBukkitListener implements Listener { } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - void onPlayerLogin(final @NonNull PlayerLoginEvent event) { + void onPlayerSpawnLocation(final @NonNull PlayerSpawnLocationEvent event) { /* If the server is brigadier-capable, any registration after players have joined (and been sent a command tree) is unsafe. Bukkit's PlayerJoinEvent is called just after the command tree is sent, - so we have to perform this state change at PlayerLoginEvent to lock before that happens. */ + so we have to perform this state change at PlayerSpawnLocationEvent to lock before that happens. */ this.bukkitCommandManager.lockIfBrigadierCapable(); }