Search in sources :

Example 26 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.

the class EntityTamesScriptEvent method onEntityTames.

@EventHandler
public void onEntityTames(EntityTameEvent event) {
    entity = new EntityTag(event.getEntity());
    owner = new EntityTag((Entity) event.getOwner());
    this.event = event;
    fire(event);
}
Also used : Entity(org.bukkit.entity.Entity) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 27 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.

the class EntityTeleportScriptEvent method onPlayerTeleports.

@EventHandler
public void onPlayerTeleports(PlayerTeleportEvent event) {
    from = new LocationTag(event.getFrom());
    to = new LocationTag(event.getTo());
    entity = new EntityTag(event.getPlayer());
    cause = event.getCause().name();
    this.event = null;
    pEvent = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 28 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.

the class FireworkBurstsScriptEvent method onFireworkBursts.

@EventHandler
public void onFireworkBursts(FireworkExplodeEvent event) {
    entity = new EntityTag(event.getEntity());
    location = new LocationTag(entity.getLocation());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 29 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.

the class HorseJumpsScriptEvent method onHorseJumps.

@EventHandler
public void onHorseJumps(HorseJumpEvent event) {
    entity = new EntityTag(event.getEntity());
    color = event.getEntity() instanceof Horse ? new ElementTag(((Horse) event.getEntity()).getColor().name()) : null;
    this.event = event;
    fire(event);
}
Also used : Horse(org.bukkit.entity.Horse) EntityTag(com.denizenscript.denizen.objects.EntityTag) ElementTag(com.denizenscript.denizencore.objects.core.ElementTag) EventHandler(org.bukkit.event.EventHandler)

Example 30 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.

the class EntityTargetsScriptEvent method onEntityTargets.

@EventHandler
public void onEntityTargets(EntityTargetEvent event) {
    entity = new EntityTag(event.getEntity());
    reason = new ElementTag(event.getReason().toString());
    target = event.getTarget() != null ? new EntityTag(event.getTarget()) : null;
    location = new LocationTag(event.getEntity().getLocation());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) ElementTag(com.denizenscript.denizencore.objects.core.ElementTag) EventHandler(org.bukkit.event.EventHandler)

Aggregations

EntityTag (com.denizenscript.denizen.objects.EntityTag)142 EventHandler (org.bukkit.event.EventHandler)81 ElementTag (com.denizenscript.denizencore.objects.core.ElementTag)56 LocationTag (com.denizenscript.denizen.objects.LocationTag)45 List (java.util.List)27 Entity (org.bukkit.entity.Entity)25 ItemTag (com.denizenscript.denizen.objects.ItemTag)17 ListTag (com.denizenscript.denizencore.objects.core.ListTag)17 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)15 InvalidArgumentsException (com.denizenscript.denizencore.exceptions.InvalidArgumentsException)12 DurationTag (com.denizenscript.denizencore.objects.core.DurationTag)11 NPCTag (com.denizenscript.denizen.objects.NPCTag)10 ArrayList (java.util.ArrayList)10 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)10 ScriptEntry (com.denizenscript.denizencore.scripts.ScriptEntry)9 Player (org.bukkit.entity.Player)9 MaterialTag (com.denizenscript.denizen.objects.MaterialTag)8 Argument (com.denizenscript.denizencore.objects.Argument)8 LivingEntity (org.bukkit.entity.LivingEntity)8 Item (org.bukkit.entity.Item)7