SpawnEntity on event

Discussion in 'Plugin Development' started by NDUGAR, May 10, 2014.

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

    NDUGAR

    So I have an event which is when a FallingBlock hits the ground, so how would I create a primed tnt on the spot at where the FallingBlock was?

    My event:

    Code:java
    1. if (event.getEntity() instanceof FallingBlock); {
    2.  
    3. }


    Why is it when I put in:

    Code:java
    1. if (event.getEntity() instanceof FallingBlock); {
    2. FallingBlock.setType(Material.AIR);
    3. }


    It red underlines setType... It says setType is undefined for FallingBlock....

    Bump???
    Any help would be awesome :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  2. Offline

    reider45

    You never called the entity a fallingblock, only checked if it was one. So name the entity as a falling block then set its type
     
Thread Status:
Not open for further replies.

Share This Page