Retiring EntityDamageByProjectileEvent in favor of EntityDamageEvent.

By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
CraftBukkit/Spigot 2011-07-19 13:26:00 -07:00
parent 2152faf4c9
commit 4af24f3d03
6 changed files with 30 additions and 5 deletions

View File

@ -0,0 +1,23 @@
package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Projectile;
public abstract class AbstractProjectile extends CraftEntity implements Projectile {
private boolean doesBounce;
public AbstractProjectile(CraftServer server, net.minecraft.server.Entity entity) {
super(server, entity);
doesBounce = false;
}
public boolean doesBounce() {
return doesBounce;
}
public void setBounce(boolean doesBounce) {
this.doesBounce = doesBounce;
}
}

View File

@ -7,7 +7,8 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.LivingEntity;
public class CraftArrow extends CraftEntity implements Arrow {
public class CraftArrow extends AbstractProjectile implements Arrow {
public CraftArrow(CraftServer server, EntityArrow entity) {
super(server, entity);
}

View File

@ -7,7 +7,8 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Egg;
import org.bukkit.entity.LivingEntity;
public class CraftEgg extends CraftEntity implements Egg {
public class CraftEgg extends AbstractProjectile implements Egg {
public CraftEgg(CraftServer server, EntityEgg entity) {
super(server, entity);
}

View File

@ -8,7 +8,7 @@ import org.bukkit.entity.Fireball;
import org.bukkit.entity.LivingEntity;
import org.bukkit.util.Vector;
public class CraftFireball extends CraftEntity implements Fireball {
public class CraftFireball extends AbstractProjectile implements Fireball {
public CraftFireball(CraftServer server, EntityFireball entity) {
super(server, entity);
}

View File

@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Fish;
import org.bukkit.entity.LivingEntity;
public class CraftFish extends CraftEntity implements Fish {
public class CraftFish extends AbstractProjectile implements Fish {
public CraftFish(CraftServer server, EntityFish entity) {
super(server, entity);
}

View File

@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Snowball;
public class CraftSnowball extends CraftEntity implements Snowball {
public class CraftSnowball extends AbstractProjectile implements Snowball {
public CraftSnowball(CraftServer server, EntitySnowball entity) {
super(server, entity);
}