From b55f68a121d2013f13f512f807edf9ab452cfe36 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 17 Aug 2013 12:22:27 +0300 Subject: [PATCH] Change handful of remaining tabs into spaces. --- .../scripts/commands/core/Comparable.java | 2 +- .../aufdemrand/denizen/tags/core/NPCTags.java | 40 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/java/net/aufdemrand/denizen/scripts/commands/core/Comparable.java b/src/main/java/net/aufdemrand/denizen/scripts/commands/core/Comparable.java index c4fab6e538..3cccfc3cca 100644 --- a/src/main/java/net/aufdemrand/denizen/scripts/commands/core/Comparable.java +++ b/src/main/java/net/aufdemrand/denizen/scripts/commands/core/Comparable.java @@ -84,7 +84,7 @@ else if (comparable instanceof dList) { if (dList.matches(arg)) comparedto = dList.valueOf(arg); else - comparedto = arg; + comparedto = arg; } else comparedto = arg; diff --git a/src/main/java/net/aufdemrand/denizen/tags/core/NPCTags.java b/src/main/java/net/aufdemrand/denizen/tags/core/NPCTags.java index d2c786ea95..ddb1a075db 100644 --- a/src/main/java/net/aufdemrand/denizen/tags/core/NPCTags.java +++ b/src/main/java/net/aufdemrand/denizen/tags/core/NPCTags.java @@ -32,7 +32,7 @@ public NPCTags(Denizen denizen) { @EventHandler public void npcTags(ReplaceableTagEvent event) { - + if (!event.matches("npc") || event.replaced()) return; // Build a new attribute out of the raw_tag supplied in the script to be fulfilled @@ -96,25 +96,25 @@ public void navBegin(NavigationBeginEvent event) { npc.action("begin navigation", null); if (event.getNPC().getNavigator().getTargetType() == TargetType.ENTITY) { - LivingEntity entity = event.getNPC().getNavigator().getEntityTarget().getTarget(); - - // If the NPC has an entity target, is aggressive towards it - // and that entity is not dead, trigger "on attack" command - if (event.getNPC().getNavigator().getEntityTarget().isAggressive() - && !entity.isDead()) - { - dPlayer player = null; - - // Check if the entity attacked by this NPC is a player - if (entity instanceof Player) - player = dPlayer.mirrorBukkitPlayer((Player) entity); - - npc.action("attack", player); - - npc.action("attack on " - + entity.getType().toString(), player); - } - previousLocations.put(event.getNPC().getId(), npc.getLocation()); + LivingEntity entity = event.getNPC().getNavigator().getEntityTarget().getTarget(); + + // If the NPC has an entity target, is aggressive towards it + // and that entity is not dead, trigger "on attack" command + if (event.getNPC().getNavigator().getEntityTarget().isAggressive() + && !entity.isDead()) { + + dPlayer player = null; + + // Check if the entity attacked by this NPC is a player + if (entity instanceof Player) + player = dPlayer.mirrorBukkitPlayer((Player) entity); + + npc.action("attack", player); + + npc.action("attack on " + + entity.getType().toString(), player); + } + previousLocations.put(event.getNPC().getId(), npc.getLocation()); } }