Added various 1.6 portal events.
This commit is contained in:
@@ -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) {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user