diff options
author | sunkid <sunkid@iminurnetz.com> | 2011-07-19 13:26:00 -0700 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-07-28 01:51:09 -0400 |
commit | 7d4ec8b1835648a2108a46480a3c2fd9e846fa0c (patch) | |
tree | 062e0f584240b75998bd3f8f6bae96f2880bfc9c /src/main/java/org | |
parent | e2e4d7f4ca1d0a3c5948304343942f11cac340a9 (diff) | |
download | craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.gz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.lz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.xz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.zip |
Retiring EntityDamageByProjectileEvent in favor of EntityDamageEvent.
Diffstat (limited to 'src/main/java/org')
6 files changed, 30 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java new file mode 100644 index 00000000..7c162551 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java @@ -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; + } + +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 84b820c5..b23cdc4a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -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); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java index 66e1ad57..215a8f2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java @@ -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); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java index 853ac1ab..cdc8b396 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java @@ -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); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java index 43ec479d..61ccd0de 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java @@ -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); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java index 488b7869..4120ac40 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java @@ -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); } |