Answers for "stop a method from running if damaged in bukkit"

0

bukkit hit without damaged

package de.thelexoplexx.TnTTagMain;
 
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
 
public class HitPlayer implements Listener {
   
    @EventHandler
    public void onPlayerDamage(EntityDamageByEntityEvent e){
        if(e.getEntity() instanceof Player){
            if(e.getDamager() instanceof Player) {
                e.setDamage(0.00);
            }
        }
    }
}
Posted by: Guest on September-23-2020

Code answers related to "stop a method from running if damaged in bukkit"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language