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

Vanishing

Comments in 'Plugin Development' started by SM11, Aug 12, 2015.

  1. SM11
    Offline

    SM11 Active Member

    Joined:
    Jun 21, 2015
    Posts:
    117
    Minecraft User:
    SM11
    Hello, I was wondering How I would Vanish a Player with the PlayerItemholdevent.
  2. iiDeathStrokeii
    Offline

    iiDeathStrokeii Active Member

    Joined:
    Mar 30, 2015
    Posts:
    111
    Minecraft User:
    iiDeathstrokeii
    hidePlayer() ?
  3. SM11
    Offline

    SM11 Active Member

    Joined:
    Jun 21, 2015
    Posts:
    117
    Minecraft User:
    SM11
    Ive gotten that Down How would I make it so that with another tap on the compass the player is revealed
  4. iiDeathStrokeii
    Offline

    iiDeathStrokeii Active Member

    Joined:
    Mar 30, 2015
    Posts:
    111
    Minecraft User:
    iiDeathstrokeii
    $v = false
    Public function PlayerInteractEvent(PlayerInteractEvent $event){
    $player = $event-getPlayer();
    If($event->getPlayer()-getItemInHand() = "x"){if($v=false)
    {$player->hidePlayer(true)}
    Elseif($v=true){$player-hidePlayer(false)}
    }

    Sorry typed this up on phone
  5. iiDeathStrokeii
    Offline

    iiDeathStrokeii Active Member

    Joined:
    Mar 30, 2015
    Posts:
    111
    Minecraft User:
    iiDeathstrokeii
    Oh and on the elsif statement your also meant to set $v to false
  6. SM11
    Offline

    SM11 Active Member

    Joined:
    Jun 21, 2015
    Posts:
    117
    Minecraft User:
    SM11
    Thanks but I already Figured it out, Thanks again though
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    1. Indent your code.
    2. Read the docs or the source. It requires a player parameter, and it is about despawning another player from $player.

Share This Page

Advertisement