Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[NEW-API] How to define $player->getLastPlayed()?

Comments in 'Plugin Development' started by iksaku, May 18, 2014.

  1. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    How can I define this function in a Years/Months/Days/Hours/Minutes/Seconds format?

    Thanks! :D
  2. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    As you can not modify the source code for it is impossible
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    date("y/m/d h/j/s", $server->getOfflinePlayer($fgjvyjdib)->getLastPlayed())?
    The format is absolutely wrong though; just an example. Look at http://php.net/function.date.php
  4. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    I mean how can I define it in date format xD
  5. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    I just wanna know how to support that format using those number provied by the $player->getLastPlayed()
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The link. Use date($format, $timestamp). Format documentation available at the link above.
    iksaku likes this.

Share This Page

Advertisement