package com.elmakers.mine.bukkit.magic;

import javax.annotation.Nonnull;

import org.bukkit.configuration.ConfigurationSection;

import com.elmakers.mine.bukkit.api.magic.MageController;

public class MobTrigger extends CustomTrigger {
    public MobTrigger(@Nonnull MageController controller, @Nonnull String key, @Nonnull ConfigurationSection configuration) {
        super(controller, key, configuration);
    }
}

@@ -122,16 +122,132 @@
 ection;%0A
+import org.bukkit.entity.Creature;%0Aimport org.bukkit.entity.Entity;%0A%0Aimport com.elmakers.mine.bukkit.api.magic.Mage;
 %0Aimport 
@@ -346,16 +346,53 @@
 igger %7B%0A
+    boolean requiresTarget = false;%0A%0A
     publ
@@ -556,16 +556,405 @@
 ation);%0A
+        requiresTarget = configuration.getBoolean(%22requires_target%22);%0A    %7D%0A%0A    public boolean isValid(Mage mage) %7B%0A        if (!isValid(mage)) return false;%0A        if (requiresTarget) %7B%0A            Entity entity = mage.getEntity();%0A            if (entity instanceof Creature) %7B%0A                return ((Creature)entity).getTarget() != null;%0A            %7D%0A        %7D%0A        return true;%0A
     %7D%0A%7D%0A

Add require_targets to mob triggers