By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-02-19 17:08:14 +00:00
parent ffe5fb2dfb
commit a36de75a17
6 changed files with 3 additions and 49 deletions

View file

@ -483,28 +483,6 @@ public abstract class Event {
*/
CREATURE_SPAWN (Category.LIVING_ENTITY),
/**
* Called when a LivingEntity is damaged by the environment (for example,
* falling or lava)
*
* @see org.bukkit.event.entity.EntityDamageByBlockEvent
*/
ENTITY_DAMAGEDBY_BLOCK (Category.LIVING_ENTITY),
/**
* Called when a LivingEntity is damaged by another LivingEntity
*
* @see org.bukkit.event.entity.EntityDamageByEntityEvent
*/
ENTITY_DAMAGEDBY_ENTITY (Category.LIVING_ENTITY),
/**
* Called when a LivingEntity is damaged by a projectile Entity
*
* @see org.bukkit.event.entity.EntityDamageByProjectileEvent
*/
ENTITY_DAMAGEDBY_PROJECTILE (Category.LIVING_ENTITY),
/**
* Called when a LivingEntity is damaged with no source.
*

View file

@ -14,7 +14,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cance
public EntityDamageByBlockEvent(Block damager, Entity damagee, DamageCause cause, int damage)
{
super(Event.Type.ENTITY_DAMAGEDBY_BLOCK, damagee, cause, damage);
super(Event.Type.ENTITY_DAMAGED, damagee, cause, damage);
this.damager = damager;
}

View file

@ -13,7 +13,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
public EntityDamageByEntityEvent(Entity damager, Entity damagee, DamageCause cause, int damage)
{
super(Event.Type.ENTITY_DAMAGEDBY_ENTITY, damagee, cause, damage);
super(Event.Type.ENTITY_DAMAGED, damagee, cause, damage);
this.damager = damager;
}

View file

@ -11,7 +11,7 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
private boolean bounce;
public EntityDamageByProjectileEvent(Entity damager, Entity damagee, Entity projectile, DamageCause cause, int damage) {
super(Event.Type.ENTITY_DAMAGEDBY_PROJECTILE, damager, damagee, cause, damage);
super(Event.Type.ENTITY_DAMAGED, damager, damagee, cause, damage);
this.projectile = projectile;
Random random = new Random();
this.bounce = random.nextBoolean();

View file

@ -12,15 +12,6 @@ public class EntityListener implements Listener {
public void onCreatureSpawn(CreatureSpawnEvent event) {
}
public void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
}
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
}
public void onEntityDamageByProjectile(EntityDamageByProjectileEvent event) {
}
public void onEntityCombust(EntityCombustEvent event) {
}

View file

@ -313,21 +313,6 @@ public final class JavaPluginLoader implements PluginLoader {
};
// Entity Events
case ENTITY_DAMAGEDBY_BLOCK:
return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onEntityDamageByBlock( (EntityDamageByBlockEvent)event );
}
};
case ENTITY_DAMAGEDBY_ENTITY:
return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onEntityDamageByEntity( (EntityDamageByEntityEvent)event );
}
};
case ENTITY_DAMAGEDBY_PROJECTILE:
return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onEntityDamageByProjectile( (EntityDamageByProjectileEvent)event );
}
};
case ENTITY_DAMAGED:
return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onEntityDamage( (EntityDamageEvent)event );