public class EarthSmash extends EarthAbility
Modifier and Type | Class and Description |
---|---|
class |
EarthSmash.BlockRepresenter
A BlockRepresenter is used to keep track of each of the individual types
of blocks that are attached to an EarthSmash.
|
class |
EarthSmash.Pair<F,S> |
static class |
EarthSmash.State |
Constructor and Description |
---|
EarthSmash(org.bukkit.entity.Player player,
ClickType type) |
Modifier and Type | Method and Description |
---|---|
void |
animateLift()
Begins animating the EarthSmash from the ground.
|
void |
checkRemainingBlocks()
Checks to see which of the blocks are still attached to the EarthSmash,
remember that blocks can be broken or used in other abilities so we need
to double check and remove any that are not still attached.
|
void |
draw()
Redraws the blocks for this instance of EarthSmash.
|
java.util.ArrayList<TempBlock> |
getAffectedBlocks() |
java.util.ArrayList<org.bukkit.entity.Entity> |
getAffectedEntities() |
int |
getAnimationCounter() |
java.util.List<org.bukkit.block.Block> |
getBlocks()
Gets the blocks surrounding the EarthSmash's loc.
|
java.util.List<org.bukkit.block.Block> |
getBlocksIncludingInner()
Gets the blocks surrounding the EarthSmash's loc.
|
long |
getChargeTime() |
long |
getCooldown() |
java.util.ArrayList<EarthSmash.BlockRepresenter> |
getCurrentBlocks() |
double |
getDamage() |
long |
getDelay() |
org.bukkit.Location |
getDestination() |
long |
getFlightAnimationInterval() |
double |
getFlightDetectionRadius() |
long |
getFlightRemoveTimer() |
double |
getFlightSpeed() |
long |
getFlightStartTime() |
double |
getGrabbedDistance() |
double |
getGrabDetectionRadius() |
double |
getGrabRange() |
double |
getKnockback() |
double |
getKnockup() |
long |
getLiftAnimationInterval() |
org.bukkit.Location |
getLocation()
Specifies the Location of the ability, which may be slightly inaccurate
depending on the Ability implementation.
|
int |
getMaxBlocksToPassThrough() |
java.lang.String |
getName()
The name of the ability is used for commands such as /bending
display and /bending help.
|
org.bukkit.block.Block |
getOrigin() |
int |
getProgressCounter() |
long |
getRemoveTimer() |
int |
getRequiredBendableBlocks() |
double |
getSelectRange() |
long |
getShootAnimationInterval() |
double |
getShootRange() |
EarthSmash.State |
getState() |
boolean |
isAllowFlight() |
boolean |
isAllowGrab() |
boolean |
isHarmlessAbility()
Determines if this ability is considered harmless against other players.
|
boolean |
isSneakAbility()
Determines if this ability uses the
PlayerToggleSneakEvent as a
controlling mechanism. |
void |
progress()
Causes the ability to be updated.
|
void |
remove()
Causes this CoreAbility instance to be removed, and
Ability.progress()
will no longer be called every tick. |
void |
revert() |
static org.bukkit.Material |
selectMaterial(org.bukkit.Material mat)
Switches the Sand Material and Gravel to SandStone and stone
respectively, since gravel and sand cannot be bent due to gravity.
|
org.bukkit.Material |
selectMaterialForRepresenter(org.bukkit.Material mat) |
void |
setAllowFlight(boolean allowFlight) |
void |
setAllowGrab(boolean allowGrab) |
void |
setAnimationCounter(int animationCounter) |
void |
setChargeTime(long chargeTime) |
void |
setCooldown(long cooldown) |
void |
setDamage(double damage) |
void |
setDelay(long delay) |
void |
setDestination(org.bukkit.Location destination) |
void |
setFlightAnimationInterval(long flightAnimationInterval) |
void |
setFlightDetectionRadius(double flightDetectionRadius) |
void |
setFlightRemoveTimer(long flightRemoveTimer) |
void |
setFlightSpeed(double flightSpeed) |
void |
setFlightStartTime(long flightStartTime) |
void |
setGrabbedDistance(double grabbedDistance) |
void |
setGrabDetectionRadius(double grabDetectionRadius) |
void |
setGrabRange(double grabRange) |
void |
setKnockback(double knockback) |
void |
setKnockup(double knockup) |
void |
setLiftAnimationInterval(long liftAnimationInterval) |
void |
setLocation(org.bukkit.Location location) |
void |
setMaxBlocksToPassThrough(int maxBlocksToPassThrough) |
void |
setOrigin(org.bukkit.block.Block origin) |
void |
setProgressCounter(int progressCounter) |
void |
setRemoveTimer(long removeTimer) |
void |
setRequiredBendableBlocks(int requiredBendableBlocks) |
void |
setSelectRange(double selectRange) |
void |
setShootAnimationInterval(long shootAnimationInterval) |
void |
setShootRange(double shootRange) |
void |
setState(EarthSmash.State state) |
void |
shootingCollisionDetection()
This method handles any collision between an EarthSmash and the
surrounding entities, the method only applies to earthsmashes that have
already been shot.
|
void |
smashToSmashCollisionDetection()
EarthSmash to EarthSmash collision can only happen when one of the
Smashes have been shot by a player.
|
addTempAirBlock, displaySandParticle, getEarthbendableBlocksLength, getEarthSourceBlock, getEarthSourceBlock, getElement, getLavaSourceBlock, getLavaSourceBlock, getLavaSourceBlock, getMetalAugment, getMovedEarth, getNearbyEarthBlock, getPreventEarthbendingBlocks, getPreventPhysicsBlocks, getSubChatColor, getTargetEarthBlock, getTargetEarthBlock, getTempAirLocations, isEarthbendable, isEarthbendable, isEarthbendable, isEarthbendable, isEarthRevertOn, isExplosiveAbility, isIgniteAbility, isLavabendable, isLavabendable, isMetalbendable, isMetalbendable, isMetalbendable, isSandbendable, isSandbendable, isSandbendable, moveEarth, moveEarth, moveEarth, moveEarth, moveEarthBlock, playEarthbendingSound, playMetalbendingSound, playSandBendingSound, removeAllEarthbendedBlocks, removeRevertIndex, removeSandSpouts, removeSandSpouts, revertAirBlock, revertAirBlock, revertBlock, stopBending
getTransparentMaterial, getTransparentMaterialSet, isDay, isEarth, isEarth, isFullMoon, isIce, isIce, isLava, isLava, isLunarEclipse, isMeltable, isMetal, isMetal, isMetalBlock, isNegativeEffect, isNeutralEffect, isNight, isPlant, isPlant, isPositiveEffect, isSand, isSand, isSnow, isSnow, isSolarEclipse, isSozinsComet, isTransparent, isTransparent, isTransparent, isUndead, isWater, isWater
getAbilities, getAbilities, getAbilities, getAbilitiesByElement, getAbility, getAbility, getBendingPlayer, getConfig, getDebugString, getDescription, getId, getLanguageConfig, getPlayer, getPlayers, getStartTime, hasAbility, isEnabled, isHiddenAbility, isRemoved, isStarted, progressAll, registerAbilities, registerAddonAbilities, registerPluginAbilities, removeAll, start
public EarthSmash(org.bukkit.entity.Player player, ClickType type)
public void progress()
Ability
public void animateLift()
public void draw()
public void revert()
public void checkRemainingBlocks()
public void remove()
CoreAbility
Ability.progress()
will no longer be called every tick. If this method is overridden then
the new method must call super.remove().
Causes the ability to be removed from existence.remove
in interface Ability
remove
in class CoreAbility
CoreAbility.isRemoved()
public java.util.List<org.bukkit.block.Block> getBlocks()
public java.util.List<org.bukkit.block.Block> getBlocksIncludingInner()
public static org.bukkit.Material selectMaterial(org.bukkit.Material mat)
public org.bukkit.Material selectMaterialForRepresenter(org.bukkit.Material mat)
public void shootingCollisionDetection()
public void smashToSmashCollisionDetection()
public java.lang.String getName()
Ability
BendingPlayer.addCooldown(Ability)
, therefore if two abilities
have the same name they will also share cooldowns. If two classes share
the same name (SurgeWall/SurgeWave) but need to have independent
cooldowns, then BendingPlayer.addCooldown(String, long)
should be
called explicitly.public org.bukkit.Location getLocation()
Ability
TorrentWave
could not be fully specified by a single location,
while it is possible for an EarthBlast
. The location is useful
for making sure that the player is currently in the same world as the
ability.BendingPlayer.canBend(CoreAbility)
public long getCooldown()
public boolean isSneakAbility()
Ability
PlayerToggleSneakEvent
as a
controlling mechanism. Currently WaterPassive
will not work while
the player has a sneak ability bound.public boolean isHarmlessAbility()
Ability
public boolean isAllowGrab()
public void setAllowGrab(boolean allowGrab)
public boolean isAllowFlight()
public void setAllowFlight(boolean allowFlight)
public int getAnimationCounter()
public void setAnimationCounter(int animationCounter)
public int getProgressCounter()
public void setProgressCounter(int progressCounter)
public int getRequiredBendableBlocks()
public void setRequiredBendableBlocks(int requiredBendableBlocks)
public int getMaxBlocksToPassThrough()
public void setMaxBlocksToPassThrough(int maxBlocksToPassThrough)
public long getDelay()
public void setDelay(long delay)
public long getChargeTime()
public void setChargeTime(long chargeTime)
public long getRemoveTimer()
public void setRemoveTimer(long removeTimer)
public long getFlightRemoveTimer()
public void setFlightRemoveTimer(long flightRemoveTimer)
public long getFlightStartTime()
public void setFlightStartTime(long flightStartTime)
public long getShootAnimationInterval()
public void setShootAnimationInterval(long shootAnimationInterval)
public long getFlightAnimationInterval()
public void setFlightAnimationInterval(long flightAnimationInterval)
public long getLiftAnimationInterval()
public void setLiftAnimationInterval(long liftAnimationInterval)
public double getGrabRange()
public void setGrabRange(double grabRange)
public double getSelectRange()
public void setSelectRange(double selectRange)
public double getShootRange()
public void setShootRange(double shootRange)
public double getDamage()
public void setDamage(double damage)
public double getKnockback()
public void setKnockback(double knockback)
public double getKnockup()
public void setKnockup(double knockup)
public double getFlightSpeed()
public void setFlightSpeed(double flightSpeed)
public double getGrabbedDistance()
public void setGrabbedDistance(double grabbedDistance)
public double getGrabDetectionRadius()
public void setGrabDetectionRadius(double grabDetectionRadius)
public double getFlightDetectionRadius()
public void setFlightDetectionRadius(double flightDetectionRadius)
public EarthSmash.State getState()
public void setState(EarthSmash.State state)
public org.bukkit.block.Block getOrigin()
public void setOrigin(org.bukkit.block.Block origin)
public org.bukkit.Location getDestination()
public void setDestination(org.bukkit.Location destination)
public java.util.ArrayList<org.bukkit.entity.Entity> getAffectedEntities()
public java.util.ArrayList<EarthSmash.BlockRepresenter> getCurrentBlocks()
public java.util.ArrayList<TempBlock> getAffectedBlocks()
public void setCooldown(long cooldown)
public void setLocation(org.bukkit.Location location)