Added various 1.6 portal events.

This commit is contained in:
Stephen
2011-06-07 14:12:08 -04:00
committed by EvilSeph
parent e72fe8bfe3
commit 92f8f6aba8
9 changed files with 150 additions and 0 deletions

View File

@@ -26,6 +26,8 @@ public class EntityListener implements Listener {
public void onEntityInteract(EntityInteractEvent event) {}
public void onEntityPortalEnter(EntityPortalEnterEvent event) {}
public void onPaintingPlace(PaintingPlaceEvent event) {}
public void onPaintingBreak(PaintingBreakEvent event) {}

View File

@@ -0,0 +1,26 @@
package org.bukkit.event.entity;
import org.bukkit.entity.Entity;
import org.bukkit.Location;
import org.bukkit.event.Cancellable;
/**
* Stores data for entities standing inside a portal block
*/
public class EntityPortalEnterEvent extends EntityEvent {
private Location location;
public EntityPortalEnterEvent(Entity entity, Location location) {
super(Type.ENTITY_PORTAL_ENTER, entity);
this.location = location;
}
/*
* Gets the portal block the entity is touching
* @return The portal block the entity is touching
*/
public Location getLocation() {
return location;
}
}