Fake Player fire TNT

Discussion in 'Plugin Development' started by homerbond005, Mar 9, 2012.

Thread Status:
Not open for further replies.
  1. Hi @ all!

    I need help for an action that fakes someone fireing TNT. Something like sendBlockChange(). Is that possible?

    Thanks!
    HomerBond005
     
  2. Offline

    Kagamul

    You could spawn a PrimedTNT Entity. something like

    Code:
    world.spawn(tntloc, TNTPrimed.class);
    greetz
    Kagamul
     
  3. Yes, I know but I want plugins like SWatchDog to log it.
     
  4. Offline

    Taco

    TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class);
    EntityExplodeEvent e = new EntityExplodeEvent(tnt);
    Bukkit.getServer().callEvent(e);

    Something like this is what you also want.
     
  5. Offline

    Kagamul

    I don't think that'll do. I believe he wants to SWatchDog to log when the TNT is being activated rather than when it explodes. Besides, if you spawn PrimedTNT it should create an EntityExplodeEvent on its own once it explodes.
     
  6. Offline

    Taco

    If he wants that, then change it to an ExplosionPrimeEvent and shoot it to the server.
     
  7. That seems good, but how do I set the player or the entity that fires the tnt?

    Thanks for the first help
    HomerBond005
     
  8. Offline

    Taco

    I don't think that one is possible since tnt is spawned due to being powered or burned.
     
Thread Status:
Not open for further replies.

Share This Page