Skip to content

Commit

Permalink
allow kill listeners to build without a target arg, allows for more g…
Browse files Browse the repository at this point in the history
…eneral kill listeners.
  • Loading branch information
Jeebiss committed Apr 13, 2013
1 parent 2a132f8 commit 13eb641
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -71,10 +71,10 @@ public void onBuild(List<String> args) {
}

// Need targets, need type
if (targets.isEmpty()) {
dB.echoError("Missing TARGETS argument!");
cancel();
}
//if (targets.isEmpty()) {
// dB.echoError("Missing TARGETS argument!");
// cancel();
//}

if (type == null) {
dB.echoError("Missing TYPE argument! Valid: NPC, ENTITY, PLAYER, GROUP");
Expand Down Expand Up @@ -179,7 +179,7 @@ public void listen(EntityDeathEvent event) {

} else if (type == KillType.PLAYER) {
if (event.getEntityType() == EntityType.PLAYER)
if (targets.contains(((Player) event.getEntity()).getName().toUpperCase()) || targets.contains("*")) {
if (targets.contains(((Player) event.getEntity()).getName().toUpperCase()) || targets.contains("*") || targets.isEmpty()) {
currentKills++;
dB.log(player.getName() + " killed " + ((Player) event.getEntity()).getName().toUpperCase() + ". Current progress '" + currentKills + "/" + quantity + "'.");
check();
Expand Down

0 comments on commit 13eb641

Please sign in to comment.