Event for lighting TNT

A new update is now available, introducing seasons and more!
Latest hotfix: 0.8.0.1 (2024-12-20)
  • Hi!


    Code
    public void onPlayerSetExplosiveEvent(PlayerSetExplosiveEvent event){
    //this would be a super useful event method
    }


    This would be great - currently I have had to make TNT explosions on Medieval Realms server zero damage to prevent griefers using it maliciously. But if someone could use it on their own land. . .

  • Well, adding an event for lighting TNT is a little bit tricky, since there are various scenarios when it needs to be triggered... I will put it on our to-do list, but I'm not sure if it will be ready in time for the next update :| However, maybe a getRelatedPlayer() function for the ExplosionEvent might be helpful in this particular case? This function would return the player who triggered the explosion, so you could check if it's the owner of the area - and set the damage to zero (or cancel the event) unless the player is the actual owner of the land.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!