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

Check Players GUI Settings

Discussion in 'Low-Quality / Outdated' started by Junkdude, May 26, 2017.

  1. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    Today I'm going to be showing you how to check whether player's have Classic UI settings on or Pocket UI. Using the code below you get there settings. To check it, you just need to do some simple if statements. Basically
    PHP:
    if($ui === 0) {
    //do something
    }
    PHP:
        //0 = CLASSIC UI
        //1 = POCKET UI

           
    public function onDataReceive(\pocketmine\event\server\DataPacketReceiveEvent $ev){
            if(
    $ev->getPacket()::NETWORK_ID === \pocketmine\network\mcpe\protocol\ProtocolInfo::LOGIN_PACKET){
                
    $ui $ev->getPacket()->clientData"UIProfile"];
            }
        }
     
    Last edited: May 29, 2017
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    No elaboration, very low-quality.
     
    corytortoise likes this.
  3. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    Mk fixing right now
     
  4. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    The ui profile is changeable while playing. Does the client tell the server if it changed the ui profile?
     
    corytortoise likes this.
  5. moska

    moska Baby Zombie

    Messages:
    105
    GitHub:
    supermaxalex
    It's only used on LoginPacket, LOGIN. So I don't know.
     
  6. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    Hmm, i might schedule a task then
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    :Facepalm:
     
  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.