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

setGamemode(3) set creative

Discussion in 'Development' started by gistrec, Nov 16, 2016.

  1. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    In 16.5 and 16.1 when I use
    $player->setGamemode(3)
    sometimes player get creative gamemode 0.o
    And in console written: 'Set own game mode to creative'
    This mean, that performed this line, i.e $client != false, but i use $player->setGamemode(3), not $player->setGamemode(3, true)
    Why?
    Sorry for my english :c
     
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    Use Constants.
    PHP:
    Player::SURVIVAL;
    Player::CREATIVE;
    Player::ADVENTURE;
    Player::SPECTATOR;
     
    gistrec and Kenn Fatt like this.
  3. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    Did not help :c
     
  4. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    Looooool, when I write in console: gm 3 name
    And name is op -> gamemode change to 3, then gamemode change to 1
    If name is no op, gamemode change only to 3 (Wow)
    Wtf? It's not my plugin's! 0.o
     
  5. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    Try on vanilla then report your issue again here.
     
    gistrec and Primus like this.
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What exactly are you talkin gabout? I don't understand. If you use $player->setGamemode(), it has no relevance with the console message at all.
     
  7. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    LOL
     
  8. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    Bingooo ;)
     
    HimbeersaftLP likes this.
  9. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    @jojoe77777 is correct. Please feel free to report this to the GitHub issue tracker. It may not be fixed immediately as it's not a high-priority issue.
     
    HimbeersaftLP likes this.
  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.