Guest User

Untitled

a guest
Oct 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public void onEntityDamage (EntityDamageEvent event) {
  2.  
  3. if (!event.isCancelled() && event instanceof EntityDamageByEntityEvent && (event.getEntity() instanceof Player)) {
  4. EntityDamageByEntityEvent hit = (EntityDamageByEntityEvent) event;
  5.  
  6. if (hit.getDamager() instanceof Snowball) {
  7. Entity plyr = event.getEntity();
  8. if (plyr instanceof Player) {
  9. event.setDamage(plugin.getConfiguration().getInt("Snowball Damage", ExplicitSnowbawlz.SnowballDmg));
  10. }
  11. if (plyr instanceof Sheep) {
  12. event.setDamage(plugin.getConfiguration().getInt("Snowball Damage", ExplicitSnowbawlz.SnowballDmg));
  13. }
  14. }
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment