bukkit hit without damaged

Solutions on MaxInterview for bukkit hit without damaged by the best coders in the world

showing results for - "bukkit hit without damaged"
Nala
26 Jan 2019
1package de.thelexoplexx.TnTTagMain;
2 
3import org.bukkit.entity.Player;
4import org.bukkit.event.EventHandler;
5import org.bukkit.event.Listener;
6import org.bukkit.event.entity.EntityDamageByEntityEvent;
7 
8public class HitPlayer implements Listener {
9   
10    @EventHandler
11    public void onPlayerDamage(EntityDamageByEntityEvent e){
12        if(e.getEntity() instanceof Player){
13            if(e.getDamager() instanceof Player) {
14                e.setDamage(0.00);
15            }
16        }
17    }
18}