1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

getName() ?

Discussion in 'Development' started by GOdly, Dec 5, 2016.

  1. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    How can I getName() the player when he/she offline. Because I use it when the player offline
    didn't work
     
  2. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    I would suggest you to make a (.yml) file and add it into the file. You can check it when the player is online.. I'm not sure about the OfflinePlayer get thing..... It would be easier using a config and check it on PlayerJoinEvent or PreLoginEvent*
     
  3. Harviy

    Harviy Spider

    Messages:
    13
    It will not work if the player is not online. You have to write the full name of the player.
     
  4. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    Is that what i mean ? getName() the player when he/she offline
     
  5. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    That's so easier :p
     
  6. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    It's an alternate solution..
     
  7. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    And how should i write the code ?? :)
     
  8. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    $args[0] :p
     
  9. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    Whut ??????
     
  10. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    If the person has to write the full name, then the player's name is $args[0] :p

    But I'm quite sure it's possible to check if a player file exists of that player...
     
  11. GOdly

    GOdly Witch

    Messages:
    50
    GitHub:
    CentOsDogE
    Please write me a code :oops:
     
  12. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    yes, there's a way. I'm not very sure on the way but it works! :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.