Package com.sucy.skill.api.projectile
Class HomingProjectile
java.lang.Object
org.bukkit.scheduler.BukkitRunnable
com.sucy.skill.api.projectile.CustomProjectile
com.sucy.skill.api.projectile.HomingProjectile
- All Implemented Interfaces:
Followable,Runnable,org.bukkit.metadata.Metadatable
ProSkillAPI © 2023
com.sucy.skill.api.projectile.HomingProjectile
-
Constructor Summary
ConstructorsConstructorDescriptionHomingProjectile(CustomProjectile baseProjectile, EffectTarget target, double angle) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.bukkit.event.Eventexpire()Handles expiring due to range or leaving loaded chunksprotected doubleorg.bukkit.LocationRetrieves the location of the projectileprotected org.bukkit.util.Vectorprotected org.bukkit.event.Eventhit(org.bukkit.entity.LivingEntity entity) Handles hitting an entityprotected org.bukkit.event.Eventland()Handles landing on terrainprotected booleanlanded()voidrun()protected voidsetVelocity(org.bukkit.util.Vector vel) Methods inherited from class com.sucy.skill.api.projectile.CustomProjectile
applyLanded, calcRain, calcSpread, cancel, checkCollision, getMetadata, getShooter, hasMetadata, isTraveling, isValid, removeMetadata, setAllyEnemy, setCallback, setMetadataMethods inherited from class org.bukkit.scheduler.BukkitRunnable
getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously
-
Constructor Details
-
HomingProjectile
-
-
Method Details
-
getLocation
public org.bukkit.Location getLocation()Description copied from class:CustomProjectileRetrieves the location of the projectile- Specified by:
getLocationin interfaceFollowable- Specified by:
getLocationin classCustomProjectile- Returns:
- location of the projectile
-
expire
protected org.bukkit.event.Event expire()Description copied from class:CustomProjectileHandles expiring due to range or leaving loaded chunks- Specified by:
expirein classCustomProjectile
-
land
protected org.bukkit.event.Event land()Description copied from class:CustomProjectileHandles landing on terrain- Specified by:
landin classCustomProjectile
-
hit
protected org.bukkit.event.Event hit(org.bukkit.entity.LivingEntity entity) Description copied from class:CustomProjectileHandles hitting an entity- Specified by:
hitin classCustomProjectile- Parameters:
entity- entity the projectile hit
-
landed
protected boolean landed()- Specified by:
landedin classCustomProjectile- Returns:
- true if the projectile has landed on terrain, false otherwise
-
getCollisionRadius
protected double getCollisionRadius()- Specified by:
getCollisionRadiusin classCustomProjectile- Returns:
- squared radius for colliding
-
getVelocity
protected org.bukkit.util.Vector getVelocity()- Specified by:
getVelocityin classCustomProjectile
-
setVelocity
protected void setVelocity(org.bukkit.util.Vector vel) - Specified by:
setVelocityin classCustomProjectile
-
run
public void run()
-