diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 14:51:28 +0100 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 14:51:28 +0100 |
commit | bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59 (patch) | |
tree | e4ccea577664ee493b2332b767cf4572fbc103b5 /src/main/java/org | |
parent | 8deb57b54af75b7c1ba7573f3ed4ab8e0763c400 (diff) | |
download | bukkit-bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59.tar bukkit-bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59.tar.gz bukkit-bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59.tar.lz bukkit-bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59.tar.xz bukkit-bbd0ad4c36c1d38b3d530562ed49fa3a452b9d59.zip |
Added OfflinePlayer.getPlayer() for getting the online Player object
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/OfflinePlayer.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java index f0d59c3a..76f499fc 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -2,6 +2,7 @@ package org.bukkit; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.entity.AnimalTamer; +import org.bukkit.entity.Player; import org.bukkit.permissions.ServerOperator; public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable { @@ -46,4 +47,14 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * @param value true if whitelisted */ public void setWhitelisted(boolean value); + + /** + * Gets a {@link Player} object that this represents, if there is one + * <p> + * If the player is online, this will return that player. Otherwise, + * it will return null. + * + * @return Online player + */ + public Player getPlayer(); } |