2015-07-26 16:51:12 +02:00
|
|
|
package com.plotsquared.bukkit.object;
|
2015-02-21 13:52:50 +01:00
|
|
|
|
2015-07-30 16:25:16 +02:00
|
|
|
import java.util.UUID;
|
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
import org.bukkit.OfflinePlayer;
|
|
|
|
|
2015-07-30 16:25:16 +02:00
|
|
|
import com.intellectualcrafters.plot.object.OfflinePlotPlayer;
|
2015-07-27 19:50:04 +02:00
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
public class BukkitOfflinePlayer implements OfflinePlotPlayer {
|
|
|
|
|
2015-02-23 02:32:27 +01:00
|
|
|
public final OfflinePlayer player;
|
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
/**
|
|
|
|
* Please do not use this method. Instead use BukkitUtil.getPlayer(Player), as it caches player objects.
|
|
|
|
* @param player
|
|
|
|
*/
|
2015-02-23 02:32:27 +01:00
|
|
|
public BukkitOfflinePlayer(final OfflinePlayer player) {
|
2015-02-21 13:52:50 +01:00
|
|
|
this.player = player;
|
|
|
|
}
|
2015-02-23 02:32:27 +01:00
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
@Override
|
|
|
|
public UUID getUUID() {
|
2015-02-23 02:32:27 +01:00
|
|
|
return this.player.getUniqueId();
|
2015-02-21 13:52:50 +01:00
|
|
|
}
|
2015-02-23 02:32:27 +01:00
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
@Override
|
|
|
|
public long getLastPlayed() {
|
2015-02-23 02:32:27 +01:00
|
|
|
return this.player.getLastPlayed();
|
2015-02-21 13:52:50 +01:00
|
|
|
}
|
2015-02-23 02:32:27 +01:00
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
@Override
|
|
|
|
public boolean isOnline() {
|
2015-02-23 02:32:27 +01:00
|
|
|
return this.player.isOnline();
|
2015-02-21 13:52:50 +01:00
|
|
|
}
|
2015-02-23 02:32:27 +01:00
|
|
|
|
2015-02-21 13:52:50 +01:00
|
|
|
@Override
|
|
|
|
public String getName() {
|
2015-02-23 02:32:27 +01:00
|
|
|
return this.player.getName();
|
2015-02-21 13:52:50 +01:00
|
|
|
}
|
|
|
|
}
|