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

Detecting UI Profile(Not on Join)

Discussion in 'Development' started by Junkdude, Apr 22, 2019.

  1. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    How would I check the players UI profile on whether it was Classic or Pocket?
     
  2. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    What could I do if I was not trying to check it onJoin by any chance?
     
  3. KielKing

    KielKing Zombie

    Messages:
    245
    GitHub:
    kielking
    you can use DataPacketReceiveEvent, check if the packet is LoginPacket, if it is, you get the value
    PHP:
    $ui $packet->clientData["UIProfile"];
    /** int(0) is Classic, int(1) is Pocket */
    keep in mind the player can change their UIProfile while in the server
     
    Levi likes this.
  4. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    What if I didn't want to detect on join because of the reason above
     
  5. KielKing

    KielKing Zombie

    Messages:
    245
    GitHub:
    kielking
    as far as I know you can't
     
  6. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    Dang, is there anyway to prevent them from changing it on the server
     
  7. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Sadly nothing can be done about this. The client sends no packets to the server at the time they change their UI profile, so it doesn't seem like there's any way. There isn't any way to lock the toggle either.
     
    HimbeersaftLP likes this.
  8. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    That sucks alot
     
  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.