Will I get in trouble?

Discussion in 'Plugin Development' started by TaiSmoove, Jul 1, 2013.

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

    TaiSmoove

    Okay, so I was on the Plugin Tutorial site, and I made an edit to something...
    Code:java
    1. public void onExplosionPrime(ExplosionPrimeEvent e){
    2.  
    3. Entity entity = e.getEntity();
    4.  
    5. if (entity instanceof TNTPrimed){
    6. TNTPrimed tnt = (TNTPrimed) e;
    7. e.getEntity().getWorld().createExplosion(tnt.getLocation(), 0); /*Using the e.getEntity().getWorld().creatExplosion(tnt.getLocation(), 0); Makes the explosion do no damage but make the sound*/
    8.  
    9. }
    10. }


    All of the e's were event's and I added a multi-line comment
     
  2. Offline

    hawkfalcon

    You can change event to e just fine :)
    Edit: event is just the name that the event is referenced by, you could change it for fluffy if you so wish.
     
  3. Offline

    LucasEmanuel

    TaiSmoove
    You don't have to create an entirely new explosion. You could just play the sound-effect at the location :)
     
  4. Offline

    TaiSmoove

  5. Offline

    hawkfalcon

  6. Offline

    LucasEmanuel

    hawkfalcon
    I reverted his changes, his changes also made the code incorrect. The parsing was done on the wrong object.
     
    Paxination and hawkfalcon like this.
  7. Offline

    Paxination

    WOW!
     
  8. Offline

    AstramG

    Why would you change it...
     
Thread Status:
Not open for further replies.

Share This Page