Search in sources :

Example 26 with LocationTag

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

the class ProjectileLaunchedScriptEvent method onProjectileLaunched.

@EventHandler
public void onProjectileLaunched(ProjectileLaunchEvent event) {
    Entity projectile = event.getEntity();
    EntityTag.rememberEntity(projectile);
    this.projectile = new EntityTag(projectile);
    location = new LocationTag(event.getEntity().getLocation());
    this.event = event;
    fire(event);
    EntityTag.forgetEntity(projectile);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) Entity(org.bukkit.entity.Entity) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 27 with LocationTag

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

the class SheepRegrowsScriptEvent method onSheepRegrows.

@EventHandler
public void onSheepRegrows(SheepRegrowWoolEvent 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 28 with LocationTag

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

the class PlayerEmptiesBucketScriptEvent method onBucketEmpty.

@EventHandler
public void onBucketEmpty(PlayerBucketEmptyEvent event) {
    location = new LocationTag(event.getBlockClicked().getLocation());
    item = new ItemTag(event.getBucket());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 29 with LocationTag

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

the class PlayerFillsBucketScriptEvent method onBucketFill.

@EventHandler
public void onBucketFill(PlayerBucketFillEvent event) {
    entity = new EntityTag(event.getPlayer());
    location = new LocationTag(event.getBlockClicked().getLocation());
    item = new ItemTag(event.getItemStack());
    material = new MaterialTag(event.getBlockClicked());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) MaterialTag(com.denizenscript.denizen.objects.MaterialTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 30 with LocationTag

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

the class PlayerLeavesBedScriptEvent method onPlayerLeavesBed.

@EventHandler
public void onPlayerLeavesBed(PlayerBedLeaveEvent event) {
    if (EntityTag.isNPC(event.getPlayer())) {
        return;
    }
    location = new LocationTag(event.getBed().getLocation());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) EventHandler(org.bukkit.event.EventHandler)

Aggregations

LocationTag (com.denizenscript.denizen.objects.LocationTag)133 EventHandler (org.bukkit.event.EventHandler)69 EntityTag (com.denizenscript.denizen.objects.EntityTag)45 ElementTag (com.denizenscript.denizencore.objects.core.ElementTag)40 MaterialTag (com.denizenscript.denizen.objects.MaterialTag)33 List (java.util.List)21 ItemTag (com.denizenscript.denizen.objects.ItemTag)18 DurationTag (com.denizenscript.denizencore.objects.core.DurationTag)15 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)14 ListTag (com.denizenscript.denizencore.objects.core.ListTag)13 NPCTag (com.denizenscript.denizen.objects.NPCTag)12 Location (org.bukkit.Location)11 ArrayList (java.util.ArrayList)8 Entity (org.bukkit.entity.Entity)8 FakeBlock (com.denizenscript.denizen.utilities.blocks.FakeBlock)6 InvalidArgumentsException (com.denizenscript.denizencore.exceptions.InvalidArgumentsException)6 Player (org.bukkit.entity.Player)6 Vector (org.bukkit.util.Vector)6 UUID (java.util.UUID)5 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)5