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

PeacefulSpawn 2.5

Keeps your players safe in spawn

  1. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I'll see if using a Vector2 fixes it. I tested on Beta 1, and it worked fine.
  2. Huntereb
    Offline

    Huntereb Active Member

    Joined:
    Sep 6, 2013
    Posts:
    41
    Minecraft User:
    Huntereb
    That's what I meant.

    Thank you!
  3. hoyinm14mc
    Offline

    hoyinm14mc Notable Member Plugin Developer

    Joined:
    Jun 4, 2014
    Posts:
    501
    Plugins:
    9
    Minecraft User:
    hoyinm14mc
    Finally I get it
  4. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Does it actually protect people in spawn? Or will it just not disable?
  5. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
  6. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    hey
    this is great plugin but it has problem , that when an op do /kill <player> and the player is in the PeacefulSpawn they well not die because you have cancelled all the causes , so what you should do is
    PHP:
       $entity $event->getEntity();
        
    $v = new Vector3($entity->getLevel()->getSpawn()->x,$entity->y,$entity->getLevel()->getSpawn()->z);
        
    $r $this->getServer()->getSpawnRadius();
        if(
    $entity instanceof Player && $entity->distance($v) <= $r && $this->enabled == true && !$event->getCause() == 12) {
          
    $event->setCancelled();
        }
      }
    Last edited: Jul 22, 2014
  7. Huntereb
    Offline

    Huntereb Active Member

    Joined:
    Sep 6, 2013
    Posts:
    41
    Minecraft User:
    Huntereb
    This still doesn't work for me! :(
  8. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    it doesnt work. players can still kill each other at spawn area.
  9. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I think EntityDamageEvent was changed in Beta2.
    iJoshuaHD and Jon like this.
  10. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I think I found it! The distance function was removed from entities.

    Old:
    PHP:
    $entity->distance($v)
    New:
    PHP:
    $entity->getPosition()->distance($v)
    I'll begin testing now.
    Jon likes this.
  11. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    update
  12. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Nope! But I really did find it!
    PHP:
    $this->getServer()->getSpawnRadius()
    For some reason, that always returns 0!
  13. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    look before and after that
  14. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Completely fixed! Now works with Beta1, Beta2, and Beta3! Submitting update now...
    tnpxxsheepdog likes this.
  15. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Woot
  16. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
  17. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    the new update still doesnt work. player could still kill each other at spawn.
  18. PHILBOY26
    Offline

    PHILBOY26 New Member

    Joined:
    Aug 16, 2014
    Posts:
    6
    Minecraft User:
    PHILBOY26
    Nice plug in :) keep it up
  19. PHILBOY26
    Offline

    PHILBOY26 New Member

    Joined:
    Aug 16, 2014
    Posts:
    6
    Minecraft User:
    PHILBOY26
    Nice server too can I bee an admin plsss ign.PHLBOY26
  20. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    So apparently, EntityDamageEvent doesn't apply to PVP...

Share This Page

Advertisement