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,434
    Plugins:
    14
    LDX submitted a new plugin:

    PeacefulSpawn - Keeps your players safe in spawn

    Read more about this plugin...
    PHILBOY26 likes this.
  2. MegaSamNinja
    Offline

    MegaSamNinja Active Member

    Joined:
    Sep 13, 2013
    Posts:
    138
    Minecraft User:
    Bamuel
    Thanks this will help for my pvp protector plugin
  3. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,201
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    make peacefulspawn available in all worlds. i seem to have problem with this. thanks
  4. Turik
    Offline

    Turik New Member

    Joined:
    May 13, 2014
    Posts:
    1
    Minecraft User:
    sdayura
    if it will work with all words, it will be the best plugin ever
  5. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    I'll work on it.
    iJoshuaHD likes this.
  6. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    So does this new update protect breaking blocks in spawn radius too?
  7. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    What exactly does the update feature, and it's bugs
  8. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    I think I know the cause of the no breaking painting bug. Paintings are entities and the code says entityhurt
  9. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    Yes, I know that. I was going to fix it, but @shoghicp removed the event info page from Github. :p
  10. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    wies and iJoshuaHD like this.
  11. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,201
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
  12. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
  13. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    btw there is someone that keeps swearing on ldx craft, I think its called peaceful or peace
    LDX likes this.
  14. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    Why change PlayerInteract to entityhurt?
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    It never was PlayerInteract.
  16. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    This was version 1.1 , it works the same, and you can break paintings. I think that works better. Look.
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=PeacefulSpawn
    description=Players can't harm eachother at spawn
    version=1.1
    author=wies
    class=PeacefulSpawn
    apiversion=10,11,12
    */

    class PeacefulSpawn implements Plugin{
        private 
    $api;
        private 
    $server;
        public function 
    __construct(ServerAPI $api$server false){
            
    $this->api $api;
            
    $this->server ServerAPI::request();
        }
       
        public function 
    init(){
            
    $this->api->addHandler('player.interact', array($this'playerInteract'));
            
    $this->size $this->server->api->getProperty('spawn-protection');
        }
       
        public function 
    playerInteract($data){
            
    $target $data['targetentity'];
            
    $t = new Vector2($target->x$target->z);
            
    $s = new Vector2($this->server->spawn->x$this->server->spawn->z);
            if(
    $t->distance($s) <= $this->size){
                
    $data['entity']->player->sendChat('PvP is not allowed at the spawn.');
                return 
    false;
            }
        }
       
        public function 
    __destruct(){}
    }
  17. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    I'll test it, but don't forget, that version didn't work at all. ;)
  18. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    Testing...
  19. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    It's a modified version mixed in with an updated version to fix bugs. I use it in my server and it works
  20. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    But your way, it only protects players from other players.

Share This Page

Advertisement