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

Vanish

Comments in 'Plugin Development' started by SuperChipsLP, Nov 21, 2013.

  1. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Hey!

    How can i vanish a player?

    I would like to use something like that
    in an event using
    PHP:
    $data['player'];
    Is that possible?

    Thanks!
  2. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    It would require an API change
  3. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Didn'd @VanishedKevin did it with his plugin?
  4. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Yes, with an API change
  5. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    What do i need to change then? When i only want 2-3 players vanished?
  6. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Not sure, I usually don't tinker with the API ;)
  7. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Maybe @wies knows :p
  8. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    I would ask either wies or VanishedKevin
  9. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Haven't test this yet, but this should work and doesn't need any src modification:
    PHP:
    $player $this->api->player->get('wies');
    $players $this->api->player->getAll();
    $this->api->player->broadcastPacket($playersMC_REMOVE_PLAYER, array(
       
    "clientID" => 0,
       
    "eid" => $player->entity->eid,
    ));
  10. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Thanks. I will test it. ;)
  11. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Wow, that's a really good idea, but won't the server send another packet adding the player after a while?
  12. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    No it won't, but it will send player move packets and others that may give some trouble
  13. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Yeah that likely would, I will test it on my local server tonight.
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    So with broadcastPacket we can add dummy players?
  15. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Yes, but I think there is an easier way.
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Well, at least it won't be as simple as new Player() (I love that in java)
  17. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I believe Hexdro has an NPC plugin for PocketMine that does this. It might be outdated though.
  18. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    It's made by 500ise an hexdro asked to take over the development but didn't made it.
  19. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    It won't work in multi-world server. XD
  20. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Sorry, I said has as you can find it one his mod page. Should have credited 500ise though.
    wies likes this.

Share This Page

Advertisement