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