mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Retiring EntityDamageByProjectileEvent in favor of EntityDamageEvent.
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
parent
2152faf4c9
commit
4af24f3d03
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user