public long getLastPlayed() {
    Player player = getPlayer();
    if (player != null) return player.getLastPlayed();

    NBTTagCompound data = getCraftData();

    if (data != null) {
      if (data.hasKey("lastPlayed")) {
        return data.getLong("lastPlayed");
      } else {
        File file = getDataFile();
        return file.lastModified();
      }
    } else {
      return 0;
    }
  }
Example #2
0
 @Override
 public long getLastPlayed() {
   return caller.getLastPlayed();
 }
Example #3
0
 public long getPreviousLogin() {
   if (last == 0) {
     last = player.getLastPlayed();
   }
   return last;
 }