diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-12-12 17:38:27 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-12-12 17:38:27 +0000 |
commit | 4daf43b09bd82dbf88e23d53a674bbc4e2bf62df (patch) | |
tree | 1b11ab8129f6c06a22ac885ec17b4eccefd9ebd8 /src | |
parent | 022bae1198bf243babdc8aac0f8b7e00d97e43e7 (diff) | |
download | bukkit-4daf43b09bd82dbf88e23d53a674bbc4e2bf62df.tar bukkit-4daf43b09bd82dbf88e23d53a674bbc4e2bf62df.tar.gz bukkit-4daf43b09bd82dbf88e23d53a674bbc4e2bf62df.tar.lz bukkit-4daf43b09bd82dbf88e23d53a674bbc4e2bf62df.tar.xz bukkit-4daf43b09bd82dbf88e23d53a674bbc4e2bf62df.zip |
Added OfflinePlayer + Player .getLastPlayed, .getFirstPlayed, .hasPlayedBefore
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/OfflinePlayer.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java index 76f499fc..2f4ca39f 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -57,4 +57,31 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * @return Online player */ public Player getPlayer(); + + /** + * Gets the first date and time that this player was witnessed on this server. + * <p> + * If the player has never played before, this will return 0. Otherwise, it will be + * the amount of milliseconds since midnight, January 1, 1970 UTC. + * + * @return Date of first log-in for this player, or 0 + */ + public long getFirstPlayed(); + + /** + * Gets the last date and time that this player was witnessed on this server. + * <p> + * If the player has never played before, this will return 0. Otherwise, it will be + * the amount of milliseconds since midnight, January 1, 1970 UTC. + * + * @return Date of last log-in for this player, or 0 + */ + public long getLastPlayed(); + + /** + * Checks if this player has played on this server before. + * + * @return True if the player has played before, otherwise false + */ + public boolean hasPlayedBefore(); } |