PlotSquared/src/main/java/com/plotsquared/bukkit/object/BukkitOfflinePlayer.java

47 lines
883 B
Java
Raw Normal View History

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-09-11 12:09:22 +02: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-09-11 12:09:22 +02:00
public BukkitOfflinePlayer(final OfflinePlayer player)
{
2015-02-21 13:52:50 +01:00
this.player = player;
}
2015-09-11 12:09:22 +02:00
2015-02-21 13:52:50 +01:00
@Override
2015-09-11 12:09:22 +02:00
public UUID getUUID()
{
return player.getUniqueId();
2015-02-21 13:52:50 +01:00
}
2015-09-11 12:09:22 +02:00
2015-02-21 13:52:50 +01:00
@Override
2015-09-11 12:09:22 +02:00
public long getLastPlayed()
{
return player.getLastPlayed();
2015-02-21 13:52:50 +01:00
}
2015-09-11 12:09:22 +02:00
2015-02-21 13:52:50 +01:00
@Override
2015-09-11 12:09:22 +02:00
public boolean isOnline()
{
return player.isOnline();
2015-02-21 13:52:50 +01:00
}
2015-09-11 12:09:22 +02:00
2015-02-21 13:52:50 +01:00
@Override
2015-09-11 12:09:22 +02:00
public String getName()
{
return player.getName();
2015-02-21 13:52:50 +01:00
}
}