Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onEntityDamage (EntityDamageEvent event) {
- if (!event.isCancelled() && event instanceof EntityDamageByEntityEvent && (event.getEntity() instanceof Player)) {
- EntityDamageByEntityEvent hit = (EntityDamageByEntityEvent) event;
- if (hit.getDamager() instanceof Snowball) {
- Entity plyr = event.getEntity();
- if (plyr instanceof Player) {
- event.setDamage(plugin.getConfiguration().getInt("Snowball Damage", ExplicitSnowbawlz.SnowballDmg));
- }
- if (plyr instanceof Sheep) {
- event.setDamage(plugin.getConfiguration().getInt("Snowball Damage", ExplicitSnowbawlz.SnowballDmg));
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment