public class LavaFlow extends LavaAbility
Modifier and Type | Class and Description |
---|---|
static class |
LavaFlow.AbilityType |
Constructor and Description |
---|
LavaFlow(org.bukkit.entity.Player player,
LavaFlow.AbilityType type)
Creates a new LavaFlow ability and initializes all of the variables and
cooldowns.
|
Modifier and Type | Method and Description |
---|---|
void |
createLava(org.bukkit.block.Block block)
Creates a LavaBlock and appends the TempBlock to our arraylist called
TEMP_LAVA_BLOCKS.
|
static double |
distanceSquaredXZ(org.bukkit.Location l1,
org.bukkit.Location l2)
Gets the distance between 2 locations but ignores their Y values.
|
static java.util.ArrayList<org.bukkit.block.Block> |
getAdjacentBlocks(org.bukkit.Location loc)
Returns an ArrayList of all the surrounding blocks for loc, but it
excludes the block that is contained at Loc.
|
java.util.ArrayList<org.bukkit.block.Block> |
getAdjacentLavaBlocks(org.bukkit.Location loc)
Returns a list of all the Lava blocks that are adjacent to the block at
loc.
|
java.util.ArrayList<TempBlock> |
getAffectedBlocks() |
long |
getClickLandCleanupDelay() |
long |
getClickLandCooldown() |
long |
getClickLandDelay() |
double |
getClickLandRadius() |
long |
getClickLavaCleanupDelay() |
long |
getClickLavaCooldown() |
long |
getClickLavaDelay() |
double |
getClickLavaRadius() |
double |
getClickRange() |
long |
getCooldown() |
double |
getCurrentRadius() |
int |
getDownwardFlow() |
double |
getLandCreateSpeed() |
double |
getLavaCreateSpeed() |
static java.util.ArrayList<LavaFlow> |
getLavaFlow(org.bukkit.entity.Player player,
LavaFlow.AbilityType type)
Returns all of the LavaFlows created by a specific player but filters the
abilities based on shift or click.
|
org.bukkit.Location |
getLocation()
Specifies the Location of the ability, which may be slightly inaccurate
depending on the Ability implementation.
|
java.lang.String |
getName()
The name of the ability is used for commands such as /bending
display and /bending help.
|
org.bukkit.Location |
getOrigin() |
double |
getParticleDensity() |
double |
getParticleOffset() |
static org.bukkit.Material |
getRevertMaterial() |
long |
getShiftCooldown() |
int |
getShiftCounter() |
double |
getShiftFlowSpeed() |
double |
getShiftMaxRadius() |
double |
getShiftPlatformRadius() |
double |
getShiftRemoveDelay() |
double |
getShiftRemoveSpeed() |
java.util.ArrayList<org.bukkit.scheduler.BukkitRunnable> |
getTasks() |
static java.util.Map<org.bukkit.block.Block,TempBlock> |
getTempLandBlocks() |
static java.util.Map<org.bukkit.block.Block,TempBlock> |
getTempLavaBlocks() |
long |
getTime() |
LavaFlow.AbilityType |
getType() |
int |
getUpwardFlow() |
boolean |
isAllowNaturalFlow() |
boolean |
isClickIsFinished() |
boolean |
isHarmlessAbility()
Determines if this ability is considered harmless against other players.
|
boolean |
isMakeLava() |
boolean |
isRemoving() |
boolean |
isShiftIsFinished() |
boolean |
isSneakAbility()
Determines if this ability uses the
PlayerToggleSneakEvent as a
controlling mechanism. |
void |
progress()
Progresses LavaFlow by 1 tick.
|
void |
remove()
Removes this instance of LavaFlow, cleans up any blocks that are
remaining in TEMP_LAVA_BLOCKS, and cancels any remaining tasks.
|
void |
removeInstantly()
Removes this ability instance instantly.
|
void |
removeLava(org.bukkit.block.Block testBlock)
Removes a lava block if it is inside of our ArrayList of TempBlocks.
|
void |
removeOnDelay()
Causes this instance of LavaFlow to remove() after a specified amount of
time.
|
void |
setAllowNaturalFlow(boolean allowNaturalFlow) |
void |
setClickIsFinished(boolean clickIsFinished) |
void |
setClickLandCleanupDelay(long clickLandCleanupDelay) |
void |
setClickLandCooldown(long clickLandCooldown) |
void |
setClickLandDelay(long clickLandDelay) |
void |
setClickLandRadius(double clickLandRadius) |
void |
setClickLavaCleanupDelay(long clickLavaCleanupDelay) |
void |
setClickLavaCooldown(long clickLavaCooldown) |
void |
setClickLavaDelay(long clickLavaDelay) |
void |
setClickLavaRadius(double clickLavaRadius) |
void |
setClickRange(double clickRange) |
void |
setCurrentRadius(double currentRadius) |
void |
setDownwardFlow(int downwardFlow) |
void |
setLandCreateSpeed(double landCreateSpeed) |
void |
setLavaCreateSpeed(double lavaCreateSpeed) |
void |
setMakeLava(boolean makeLava) |
void |
setOrigin(org.bukkit.Location origin) |
void |
setParticleDensity(double particleDensity) |
void |
setParticleOffset(double particleOffset) |
void |
setRemoving(boolean removing) |
void |
setShiftCooldown(long shiftCooldown) |
void |
setShiftCounter(int shiftCounter) |
void |
setShiftFlowSpeed(double shiftFlowSpeed) |
void |
setShiftIsFinished(boolean shiftIsFinished) |
void |
setShiftMaxRadius(double shiftMaxRadius) |
void |
setShiftPlatformRadius(double shiftPlatformRadius) |
void |
setShiftRemoveDelay(double shiftRemoveDelay) |
void |
setShiftRemoveSpeed(double shiftRemoveSpeed) |
void |
setTime(long time) |
void |
setType(LavaFlow.AbilityType type) |
void |
setUpwardFlow(int upwardFlow) |
getElement, getParentAbility
addTempAirBlock, displaySandParticle, getEarthbendableBlocksLength, getEarthSourceBlock, getEarthSourceBlock, 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 LavaFlow(org.bukkit.entity.Player player, LavaFlow.AbilityType type)
player
- the player that bended the abilitytype
- either shift or sneakpublic void progress()
public void createLava(org.bukkit.block.Block block)
block
- the block that will be turned to lavapublic void removeLava(org.bukkit.block.Block testBlock)
testBlock
- the block to attempt to removepublic void removeOnDelay()
public void remove()
remove
in interface Ability
remove
in class CoreAbility
CoreAbility.isRemoved()
public void removeInstantly()
public java.util.ArrayList<org.bukkit.block.Block> getAdjacentLavaBlocks(org.bukkit.Location loc)
loc
- the middle location of the adjacent blockspublic static java.util.ArrayList<org.bukkit.block.Block> getAdjacentBlocks(org.bukkit.Location loc)
loc
- the middle block locationpublic static double distanceSquaredXZ(org.bukkit.Location l1, org.bukkit.Location l2)
l1
- the first locationl2
- the second locationpublic static java.util.ArrayList<LavaFlow> getLavaFlow(org.bukkit.entity.Player player, LavaFlow.AbilityType type)
player
- the player that created the ability instancetype
- the specific type of ability we are looking forpublic static org.bukkit.Material getRevertMaterial()
public static java.util.Map<org.bukkit.block.Block,TempBlock> getTempLandBlocks()
public static java.util.Map<org.bukkit.block.Block,TempBlock> getTempLavaBlocks()
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 isRemoving()
public void setRemoving(boolean removing)
public boolean isMakeLava()
public void setMakeLava(boolean makeLava)
public boolean isClickIsFinished()
public void setClickIsFinished(boolean clickIsFinished)
public boolean isShiftIsFinished()
public void setShiftIsFinished(boolean shiftIsFinished)
public boolean isAllowNaturalFlow()
public void setAllowNaturalFlow(boolean allowNaturalFlow)
public int getShiftCounter()
public void setShiftCounter(int shiftCounter)
public int getUpwardFlow()
public void setUpwardFlow(int upwardFlow)
public int getDownwardFlow()
public void setDownwardFlow(int downwardFlow)
public long getTime()
public void setTime(long time)
public long getClickLavaDelay()
public void setClickLavaDelay(long clickLavaDelay)
public long getClickLandDelay()
public void setClickLandDelay(long clickLandDelay)
public long getClickLavaCooldown()
public void setClickLavaCooldown(long clickLavaCooldown)
public long getClickLandCooldown()
public void setClickLandCooldown(long clickLandCooldown)
public long getShiftCooldown()
public void setShiftCooldown(long shiftCooldown)
public long getClickLavaCleanupDelay()
public void setClickLavaCleanupDelay(long clickLavaCleanupDelay)
public long getClickLandCleanupDelay()
public void setClickLandCleanupDelay(long clickLandCleanupDelay)
public double getParticleDensity()
public void setParticleDensity(double particleDensity)
public double getParticleOffset()
public void setParticleOffset(double particleOffset)
public double getCurrentRadius()
public void setCurrentRadius(double currentRadius)
public double getShiftPlatformRadius()
public void setShiftPlatformRadius(double shiftPlatformRadius)
public double getShiftMaxRadius()
public void setShiftMaxRadius(double shiftMaxRadius)
public double getShiftFlowSpeed()
public void setShiftFlowSpeed(double shiftFlowSpeed)
public double getShiftRemoveSpeed()
public void setShiftRemoveSpeed(double shiftRemoveSpeed)
public double getShiftRemoveDelay()
public void setShiftRemoveDelay(double shiftRemoveDelay)
public double getClickRange()
public void setClickRange(double clickRange)
public double getClickLavaRadius()
public void setClickLavaRadius(double clickLavaRadius)
public double getClickLandRadius()
public void setClickLandRadius(double clickLandRadius)
public double getLavaCreateSpeed()
public void setLavaCreateSpeed(double lavaCreateSpeed)
public double getLandCreateSpeed()
public void setLandCreateSpeed(double landCreateSpeed)
public LavaFlow.AbilityType getType()
public void setType(LavaFlow.AbilityType type)
public org.bukkit.Location getOrigin()
public void setOrigin(org.bukkit.Location origin)
public java.util.ArrayList<TempBlock> getAffectedBlocks()
public java.util.ArrayList<org.bukkit.scheduler.BukkitRunnable> getTasks()