Package org.bukkit.event.entity

Examples of org.bukkit.event.entity.EntityDeathEvent


    }

    @Override
    public boolean update(Event event, ObjectiveProgress progress) {
        if (event instanceof EntityDeathEvent) {
            EntityDeathEvent ev = (EntityDeathEvent) event;
            if (ev.getEntity() instanceof Player)
                return progress.getAmount() >= progress.getObjective().getAmount();
            LivingEntity entity = ev.getEntity();
            String search = progress.getObjective().getString().toLowerCase();
            boolean found = search.contains(entity.getType().getName().toLowerCase()) || search.contains("*"), reversed = !search
                    .isEmpty() && search.charAt(0) == '-';
            if (reversed ^ found) {
                progress.addAmount(1);
View Full Code Here


    }

    @Override
    public boolean update(Event event, ObjectiveProgress progress) {
        if (event instanceof EntityDeathEvent) {
            EntityDeathEvent ev = (EntityDeathEvent) event;
            HumanNPC npc = NPCManager.get(ev.getEntity());
            if (npc == null) {
                CreatureNPC cNPC = CreatureTask.getCreature(ev.getEntity());
                if (cNPC != null)
                    npc = cNPC.npc;
            }
            if (npc != null) {
                String search = progress.getObjective().getString().toLowerCase();
View Full Code Here

    }

    @Override
    public boolean update(Event event, ObjectiveProgress progress) {
        if (event instanceof EntityDeathEvent) {
            EntityDeathEvent ev = (EntityDeathEvent) event;
            if (!(ev.getEntity() instanceof Player))
                return false;
            Player player = (Player) ev.getEntity();
            String search = progress.getObjective().getString().toLowerCase();
            boolean found = false, reversed = !search.isEmpty() && search.charAt(0) == '-';
            if (search.contains("*") || search.contains(player.getName().toLowerCase())) {
                found = true;
            } else if (PermissionManager.hasBackend() && search.contains("g:")) {
View Full Code Here

TOP

Related Classes of org.bukkit.event.entity.EntityDeathEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.