Java 类org.bukkit.event.entity.EntityBreakDoorEvent 实例源码

项目:Peacecraft    文件:ProtectListener.java   
@EventHandler
public void onEntityBreakDoor(EntityBreakDoorEvent event) {
    BlockProtection blockProtection = this.module.getProtectManager().getBlockProtection(event.getBlock().getLocation());
    if(blockProtection.exists()) {
        event.setCancelled(true);
    }
}
项目:civcraft    文件:BlockListener.java   
@EventHandler(priority = EventPriority.HIGH)
public void onEntityBreakDoor(EntityBreakDoorEvent event) {
    bcoord.setFromLocation(event.getBlock().getLocation());
    StructureBlock sb = CivGlobal.getStructureBlock(bcoord);
    if (sb != null) {
        event.setCancelled(true);
    }

    CampBlock cb = CivGlobal.getCampBlock(bcoord);
    if (cb != null) {
        event.setCancelled(true);
    }
}
项目:BlockLocker    文件:BlockDestroyListener.java   
@EventHandler(ignoreCancelled = true)
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
    AttackType attackType = AttackType.UNKNOWN;
    if (event instanceof EntityBreakDoorEvent) {
        attackType = AttackType.ZOMBIE;
    } else if (event.getEntity() instanceof Enderman) {
        attackType = AttackType.ENDERMAN;
    }
    if (plugin.getChestSettings().allowDestroyBy(attackType)) {
        return;
    }
    if (isProtected(event.getBlock())) {
        event.setCancelled(true);
    }
}
项目:modules-extra    文件:ListenerEntityBlock.java   
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityBreakDoor(final EntityBreakDoorEvent event)
{
    ActionEntityBlock action = this.newAction(EntityBreak.class, event.getBlock().getWorld());
    if (action != null)
    {
        action.setNewBlock(event.getTo());
        this.setAndLog(action, adjustBlockForDoubleBlocks(event.getBlock().getState()), event.getEntity());
    }
}
项目:tregmine    文件:BlessedBlockListener.java   
@EventHandler
public void onDoorBreak(EntityBreakDoorEvent event)
{
    Location l = event.getBlock().getLocation();
    Entity e = event.getEntity();

    Map<Location, Integer> b = plugin.getBlessedBlocks();

    if (b.containsKey(l)) {
        if (e instanceof Zombie) {
            event.setCancelled(true);
        }
    }
}
项目:GriefPreventionPlus    文件:EntityEventHandler.java   
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onZombieBreakDoor(EntityBreakDoorEvent event)
{       
    if(!GriefPrevention.instance.config_zombiesBreakDoors) event.setCancelled(true);
}
项目:RedProtect    文件:RPEntityListener.java   
@EventHandler
public void onBreakDoor(EntityBreakDoorEvent e) {
    RedProtect.get().logger.debug("RPEntityListener - Is EntityBreakDoorEvent");
}