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

Particles Block

Comments in 'Plugin Development' started by PmMc, Nov 2, 2015.

  1. PmMc
    Offline

    PmMc New Member

    Joined:
    Aug 18, 2015
    Posts:
    3
    Minecraft User:
    PmServer
    PHP:
    public function BlockBreak (BlockBreakEvent $e) {
    player $e->getPlayer();
    $block $e->getBlock();
    How to add particles Location Player ?

    }
  2. TheMaks
    Offline

    TheMaks Active Member

    Joined:
    Jul 19, 2015
    Posts:
    58
    Minecraft User:
    TheMaks
    PHP:
    $e->getPlayer()->getX();
    $e->getPlayer()->getY();
    $e->getPlayer()->getZ();
    zombie_Power likes this.
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Player is a Vector3 already :p
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    This code creates a spiral series of particles. @PmMc is asking for creating particles when player breaks blocks. Please do not post if you don't even know what we are doing, and do not post any code if you don't know exactly what every line of the code means. These posts are one of the reasons why the PocketMine community is changing in nature and dying so quickly after its short prosperity.

    PHP:
    // define your own $particle
    $e->getBlock()->getLevel()->addParticle($particle->setComponents($player->x$player->y$player->z);
    Taha_The_Hacker and Legoboy0215 like this.
  5. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    When I joined, true PM forums was different.
    Taha_The_Hacker likes this.
  6. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    sorry for the miss understanding :D

    post removed

Share This Page

Advertisement