@@ -2,7 +2,5 @@ package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents an arrow.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public interface Arrow extends Entity {}
|
||||
public interface Arrow extends Projectile {}
|
||||
|
||||
@@ -2,7 +2,5 @@ package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents an egg.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public interface Egg extends Entity {}
|
||||
public interface Egg extends Projectile {}
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* Represents a Fireball.
|
||||
*/
|
||||
public interface Fireball extends Explosive {}
|
||||
public interface Fireball extends Projectile, Explosive {
|
||||
/**
|
||||
* Fireballs fly straight and do not take setVelocity(...) well.
|
||||
*
|
||||
* @param direction
|
||||
* the direction this fireball is flying toward
|
||||
*/
|
||||
public void setDirection(Vector direction);
|
||||
|
||||
/**
|
||||
* Retrieve the direction this fireball is heading toward
|
||||
*
|
||||
* @return the direction
|
||||
*/
|
||||
public Vector getDirection();
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,5 @@ package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Fish.
|
||||
*
|
||||
* @author Cogito
|
||||
*/
|
||||
public interface Fish extends Entity {}
|
||||
public interface Fish extends Projectile {}
|
||||
|
||||
23
paper-api/src/main/java/org/bukkit/entity/Projectile.java
Normal file
23
paper-api/src/main/java/org/bukkit/entity/Projectile.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a shootable entity
|
||||
*/
|
||||
public interface Projectile extends Entity {
|
||||
|
||||
/**
|
||||
* Retrieve the shooter of this projectile. The returned value can be null
|
||||
* for projectiles shot from a {@link Dispenser} for example.
|
||||
*
|
||||
* @return the {@link LivingEntity} that shot this projectile
|
||||
*/
|
||||
public LivingEntity getShooter();
|
||||
|
||||
/**
|
||||
* Set the shooter of this projectile
|
||||
*
|
||||
* @param shooter
|
||||
* the {@link LivingEntity} that shot this projectile
|
||||
*/
|
||||
public void setShooter(LivingEntity shooter);
|
||||
}
|
||||
@@ -2,7 +2,5 @@ package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Implements a snowball.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public interface Snowball extends Entity {}
|
||||
public interface Snowball extends Projectile {}
|
||||
|
||||
Reference in New Issue
Block a user