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

Mob-spawning and explosions

Comments in 'Plugin Development' started by mamayadesu, Jun 11, 2015.

Thread Status:
Not open for further replies.
  1. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    1. How I can to disable mob-spawning on selected area?
    2. How I can to disable any explosions on selected area?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Mobs don't even spawn right now... It's too early to ask.
  3. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Ok. What about 2nd question?
  4. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Two minutes...
    (Две минуты и скажу...)
  5. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    If you need cancel damage for terrain:
    PHP:
       public function onExplosion(ExplosionPrimeEvent $event){
            
    $event->setBlockBreaking(false);
        }
    If you need cancel all:
    PHP:
       public function onExplosion(ExplosionPrimeEvent $event){
            
    $event->setCancelled();
        }
    PEMapModder and CraftYourBukkit like this.
  6. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Thank you. Я не знал, что есть onExplosions().
  7. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Can you write full path to class ExplosionPrimeEvent?
  8. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Ok, щас...
    pocketmine\event\entity\ExplosionPrimeEvent; Вот.
  9. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Спасибо
  10. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Пожалуйста ;)
Thread Status:
Not open for further replies.

Share This Page

Advertisement