Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[New API] Change a Players' Gamemode

Comments in 'Plugin Development' started by Exxarion, Nov 13, 2014.

  1. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    Just a quick question, but how do i change a players gamemode when they enter a certain world? Trying to create a plugin for this.
    LDX likes this.
  2. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    PHP:
    $player->setGamemode(0); //Set
    $player->getGamemode(); //Get
    LDX likes this.
  3. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    Ok thanks.
    LDX likes this.
  4. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Make sure to save their inventories before switching them!
  5. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    how
  6. DovahDoVolom
    Offline

    DovahDoVolom Active Member

    Joined:
    Nov 29, 2013
    Posts:
    76
    Minecraft User:
    DovahDoVolom
    If you ever finish this plugin i would love to use it foe my server if its ok with you.
    LDX likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Make a database of yourself. Remember not to use a single YAML file to save inventories :p
    LDX likes this.
  8. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    making too many queries would sometimes makes the mysql server respond slow and needs a restart on certain interval.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Who told you to use a MySQL server? And even if you do, who told you to make many queries?
    LDX likes this.

Share This Page

Advertisement