001 package org.bukkit.event.hanging; 002 003 import org.bukkit.entity.Entity; 004 import org.bukkit.entity.Hanging; 005 006 /** 007 * Triggered when a hanging entity is removed by an entity 008 */ 009 public class HangingBreakByEntityEvent extends HangingBreakEvent { 010 private final Entity remover; 011 012 public HangingBreakByEntityEvent(final Hanging hanging, final Entity remover) { 013 super(hanging, HangingBreakEvent.RemoveCause.ENTITY); 014 this.remover = remover; 015 } 016 017 /** 018 * Gets the entity that removed the hanging entity 019 * 020 * @return the entity that removed the hanging entity 021 */ 022 public Entity getRemover() { 023 return remover; 024 } 025 }