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

Can I bypass force gamemode hack?

Discussion in 'Development' started by Kyd, Jun 4, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Can I prevent player from fake changing gamemode to creative using scripts?
    I tried Playergamemode change event and other things but dont working :v
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    first, verify it's client sided and not server sided
    if it's not server sided there's not much to be done then try spamming gamemode change packet
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    How I verify if it is client sided? I have tried this
    PHP:
    public function onReceive(DataPacketReceiveEvent $e){
        
    $pk $e->getPacket();
          
    $p $e->getPlayer();
        if(
    $pk instanceof PlayerSetGameTypePacket) {
              if(!
    $p->isOp()){
                
    $this->getLogger()->info("Changed gamemode for " $p->getName());
                
    $pk = new SetGameTypePacket();
                
    $pk->gamemode 0;
                
    $p->dataPacket($pk);
        }
    }
    But Nothing happens
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    try changing gamemode to cmode and place bunch of dia blocks and break bunch of random blocks
    re login and check if it's still there
     
  5. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Yes diamond blocks are still in world and destroyed blocks are destroyed
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    totally clueless...
     
  7. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Are you sure you weren't op when you tested that?
     
  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.