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

How to hide a player?

Comments in 'Plugin Development' started by EvolSoft, Jan 16, 2016.

  1. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Hi all,
    I've got a simple question about hiding a player from all others (so others can't see it). How can I do this?
  2. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    PHP:
    hidePlayer (Player $player)
    showPlayer (Player $player)
  3. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    PHP:
    foreach($this->getServer()->getOnlinePlayers() as $onlinePlayer){
        
    $onlinePlayer->hidePlayer($player); // now $onlinePlayer can't see $player
    }
  4. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Thanks :)
  5. ImNotHere
    Offline

    ImNotHere New Member

    Joined:
    Nov 12, 2016
    Posts:
    4
    Minecraft User:
    NetswordPe
  6. SamGamgee55
    Offline

    SamGamgee55 Active Member

    Joined:
    Sep 29, 2016
    Posts:
    52
    Minecraft User:
    SamGamgee55
    Please post this on the new forums. Thanks!!!
  7. Blabla
    Offline

    Blabla Active Member

    Joined:
    Sep 19, 2015
    Posts:
    82
    Minecraft User:
    The_Beast_Inside
    Question, does this work with armor too?
  8. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    ... : "Date message posted : Jan 16, 2016"
    Yes its hides the player, its not just putting it invisibility effect. If you have any other question I will redirect you to the new forum: https://forums.pmmp.io/ Thanks.
  9. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    no idea you should test it prob since helpful most people have left
    HimbeersaftLP likes this.
  10. Pocketart
    Offline

    Pocketart Active Member

    Joined:
    Aug 31, 2013
    Posts:
    55
    Minecraft User:
    Pocketart
    not sure if im here too late but I think armor doesn't become invisible. Player and armor are completely separate
  11. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace

Share This Page

Advertisement