@@ -423,6 +423,13 @@ public abstract class Event {
|
||||
* @todo: add javadoc see comment
|
||||
*/
|
||||
ENTITY_DEATH (Category.LIVING_ENTITY),
|
||||
|
||||
/**
|
||||
* Called when a Skeleton or Zombie catch fire due to the sun
|
||||
*
|
||||
* @todo: add javadoc see comment
|
||||
*/
|
||||
ENTITY_COMBUST (Category.LIVING_ENTITY),
|
||||
|
||||
/**
|
||||
* VEHICLE EVENTS
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* The event when a skeleton or zombie catch on fire due to the sun.
|
||||
* If the event is cancelled, the fire is stopped.
|
||||
*/
|
||||
public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
|
||||
public EntityCombustEvent(Type type, Entity what) {
|
||||
super(type, what);
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
public void onEntityDamagedByEntity(EntityDamagedByEntityEvent event) {
|
||||
}
|
||||
|
||||
public void onEntityCombust(EntityCombustEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user