diff --git a/paper-api/src/main/java/org/bukkit/OfflinePlayer.java b/paper-api/src/main/java/org/bukkit/OfflinePlayer.java index a8003b4796..18720a965b 100644 --- a/paper-api/src/main/java/org/bukkit/OfflinePlayer.java +++ b/paper-api/src/main/java/org/bukkit/OfflinePlayer.java @@ -24,10 +24,26 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio /** * Checks if this player is currently online * + * It should be noted that this will return true if any instance of this player is + * online! This instance may have disconnected. If you wish to check if this specific + * instance of the player is still online, see {@link OfflinePlayer#isConnected()}. + * * @return true if they are online */ public boolean isOnline(); + // Paper start + /** + * Checks whether the connection to this player is still valid. This will return + * true as long as this specific instance of the player is still connected. This + * will return false after this instance has disconnected, even if the same player + * has reconnected since. + * + * @return true if this player instance is connected + */ + public boolean isConnected(); + // Paper end + /** * Returns the name of this player *