Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package io.papermc.paper.event.connection;

import io.papermc.paper.connection.PlayerConfigurationConnection;
import io.papermc.paper.connection.PlayerConnection;
import io.papermc.paper.connection.PlayerLoginConnection;
import net.kyori.adventure.text.Component;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
Expand All @@ -10,8 +12,13 @@
/**
* Validates whether a player connection is able to log in.
* <p>
* Called when is attempting to log in for the first time, or is finishing up
* being configured.
* Called when a player is attempting to log in for the first time,
* or is finishing up being configured.
*
* @implNote Since 1.21.7, during these phases, the {@link #getConnection() connection}
* is either {@link PlayerLoginConnection} or {@link PlayerConfigurationConnection},
* allowing access to phase-specific API.
* <br>However, these underlying connection types are not guaranteed to be stable across versions.
*/
public class PlayerConnectionValidateLoginEvent extends Event {

Expand All @@ -29,9 +36,13 @@ public PlayerConnectionValidateLoginEvent(final PlayerConnection connection, fin

/**
* Gets the connection of the player in this event.
* Note, the type of this connection is not guaranteed to be stable across versions.
* Additionally, disconnecting the player through this connection / using any methods that may send packets
* is not supported.
* @apiNote Disconnecting the player through this connection
* or using any methods that may send packets is not supported.
*
* @implNote Since 1.21.7, this connection is either
* {@link PlayerLoginConnection} or {@link PlayerConfigurationConnection}
* depending on which phase it is fired in, allowing access to phase-specific API.
* <br>However, these underlying connection types are not guaranteed to be stable across versions.
*
* @return connection
*/
Expand Down
Loading