public abstract class SpellProjectile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Set<org.bukkit.block.Block> |
changed |
boolean |
kill |
int |
lifeTicks |
org.bukkit.Location |
location |
org.bukkit.Effect |
moveEffect |
int |
moveEffectData |
Spells |
name |
Ollivanders |
p |
org.bukkit.entity.Player |
player |
double |
rightWand |
int |
spellUses |
double |
usesModifier |
org.bukkit.util.Vector |
vector |
Constructor and Description |
---|
SpellProjectile(Ollivanders plugin,
org.bukkit.entity.Player player,
Spells name,
java.lang.Double rightWand) |
Modifier and Type | Method and Description |
---|---|
org.bukkit.block.Block |
getBlock()
Gets the block the projectile is inside
|
java.util.List<org.bukkit.block.Block> |
getBlocksInRadius(org.bukkit.Location loc,
double radius)
Gets the blocks in a radius of a location.
|
java.util.List<org.bukkit.block.Block> |
getBlocksTouching(org.bukkit.Location loc,
double max,
boolean includeAir,
boolean maxAsSphereVolume)
Gets the blocks touching a location, and then the blocks touching those, up to a maximum value.
|
java.util.List<org.bukkit.entity.Entity> |
getCloseEntities(double radius)
Gets entities within a distance of projectile
|
java.util.List<org.bukkit.entity.Item> |
getItems(double radius)
Gets item entities within one block of the projectile
|
java.util.List<org.bukkit.entity.LivingEntity> |
getLivingEntities(double radius)
Gets all LivingEntity within one block of projectile
|
void |
kill()
This kills the projectile.
|
void |
move()
Moves the projectile forward, creating a particle effect
|
void |
revert()
Reverts any changes made to blocks if the effects are temporary.
|
public org.bukkit.entity.Player player
public Spells name
public org.bukkit.Location location
public org.bukkit.util.Vector vector
public int lifeTicks
public boolean kill
public Ollivanders p
public double rightWand
public int spellUses
public double usesModifier
public org.bukkit.Effect moveEffect
public int moveEffectData
public java.util.Set<org.bukkit.block.Block> changed
public SpellProjectile(Ollivanders plugin, org.bukkit.entity.Player player, Spells name, java.lang.Double rightWand)
public void move()
public void kill()
public org.bukkit.block.Block getBlock()
public java.util.List<org.bukkit.entity.Entity> getCloseEntities(double radius)
radius
- - radius within which to get entitiespublic java.util.List<org.bukkit.entity.Item> getItems(double radius)
radius
- - radius within which to get entitiespublic java.util.List<org.bukkit.entity.LivingEntity> getLivingEntities(double radius)
radius
- - radius within which to get entitiespublic java.util.List<org.bukkit.block.Block> getBlocksInRadius(org.bukkit.Location loc, double radius)
loc
- - The Location that is the center of the block listradius
- - The radius of the block listpublic java.util.List<org.bukkit.block.Block> getBlocksTouching(org.bukkit.Location loc, double max, boolean includeAir, boolean maxAsSphereVolume)
loc
- - The location that is the center of the block listmax
- - The maximum number of blocks in the listincludeAir
- - Include air blocks in the returned block listmaxAsSphereVolume
- - If true, this changes the max to 4/3*pi*max^3 for compatibility reasons with previous behaviorpublic void revert()