Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onEntityGetHit(EntityDamageEvent e){
- if(e.getEntity() instanceof Player){
- Player p = (Player)e.getEntity();
- if(p.getHealth() <= 0){
- p.setHealth(20);
- p.setFoodLevel(20);
- p.setFireTicks(0);
- for(PotionEffect pot: p.getActivePotionEffects())p.removePotionEffect(pot.getType());
- p.playEffect(EntityEffect.TOTEM_RESURRECT);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement