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

How to spawnpoint

Comments in 'Plugin Development' started by CaptainKenji17, Nov 9, 2015.

  1. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    I have plugin made by korean and when you die sometimes it leaves you half heart and being invisible, I want to fix it my self but I cant find the code so i decided to make a new plugin to fix the bug


    onDeath(PlayerDeathEvent $ev){
    $player = $ev->getEntity();
    $ev->$player spawn to spawnpoint
    $ev->setHealth(20);

    and please give me a code to show player, maybe the code for legionPE when you fix invisible players @PEMapModder
  2. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Have you ever noticed LegionPE plugins are OPEN-SOURCE???
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
  5. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    when ur hunger is full it does regen slowly and I just want someone to add the code on my onDeath(.. up there, i want someone to add the missing part
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Why not cancel EntityRegainHealthEvent if player has already died?
  7. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    Thank you for the hint! I fixed it by touching the code and setting the hunger to 18 instead of 20, because if hunger is 20 itll keep you healing even u die

Share This Page

Advertisement