public interface CastContext extends MageContext
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(ActionHandler handler) |
void |
addMessageParameter(String key,
String value) |
void |
addResult(SpellResult result) |
void |
addWork(int work) |
boolean |
allowPassThrough(org.bukkit.block.Block block) |
boolean |
allowPassThrough(org.bukkit.Material material)
Deprecated.
|
boolean |
areAnyDestructible(org.bukkit.block.Block block) |
boolean |
canCast(org.bukkit.Location location) |
void |
cancelEffects() |
boolean |
canContinue(org.bukkit.Location location) |
void |
castMessage(String message) |
void |
castMessageKey(String key) |
void |
castMessageKey(String key,
String message) |
void |
clearAttachables(org.bukkit.block.Block block) |
void |
clearBreakable(org.bukkit.block.Block block) |
void |
clearReflective(org.bukkit.block.Block block) |
org.bukkit.block.Block |
findBlockUnder(org.bukkit.block.Block block) |
org.bukkit.Location |
findPlaceToStand(org.bukkit.Location target,
int verticalSearchDistance) |
org.bukkit.Location |
findPlaceToStand(org.bukkit.Location target,
int verticalSearchDistance,
boolean goUp) |
org.bukkit.block.Block |
findSpaceAbove(org.bukkit.block.Block block) |
void |
finish() |
int |
getActionsPerformed() |
org.bukkit.configuration.ConfigurationSection |
getAllVariables()
Returns all variables, this can be an expensive call so avoid using it if possible.
|
CastContext |
getBaseContext() |
Double |
getBreakable(org.bukkit.block.Block block) |
MaterialBrush |
getBrush() |
Object |
getCastData(String key) |
CasterProperties |
getCasterProperties(String propertyType) |
org.bukkit.Location |
getCastLocation()
Get the source location of this cast.
|
MageController |
getController() |
Collection<EffectPlay> |
getCurrentEffects() |
org.bukkit.util.Vector |
getDirection() |
Collection<EffectPlayer> |
getEffects(String key) |
org.bukkit.entity.Entity |
getEntity() |
org.bukkit.Location |
getEyeLocation() |
org.bukkit.block.BlockFace |
getFacingDirection() |
org.bukkit.block.Block |
getInteractBlock() |
long |
getLastTriggerTime() |
org.bukkit.entity.LivingEntity |
getLivingEntity() |
org.bukkit.Location |
getLocation() |
Mage |
getMage() |
MageClass |
getMageClass() |
Set<org.bukkit.Material> |
getMaterialSet(String key)
Deprecated.
|
CastContext |
getParent() |
org.bukkit.plugin.Plugin |
getPlugin() |
org.bukkit.block.Block |
getPreviousBlock() |
org.bukkit.block.Block |
getPreviousPreviousBlock() |
Random |
getRandom() |
Double |
getReflective(org.bukkit.block.Block block) |
SpellResult |
getResult() |
ActionHandler |
getRootHandler() |
Spell |
getSpell() |
long |
getStartTime() |
org.bukkit.block.Block |
getTargetBlock() |
CasterProperties |
getTargetCasterProperties(String propertyType) |
org.bukkit.Location |
getTargetCenterLocation() |
Collection<org.bukkit.entity.Entity> |
getTargetedEntities() |
org.bukkit.entity.Entity |
getTargetEntity() |
org.bukkit.Location |
getTargetLocation() |
Set<UUID> |
getTargetMessagesSent() |
String |
getTargetName() |
boolean |
getTargetsCaster() |
org.bukkit.Location |
getTargetSourceLocation() |
TargetType |
getTargetType() |
UndoList |
getUndoList() |
org.bukkit.configuration.ConfigurationSection |
getVariables()
Returns cast-local variables
|
org.bukkit.configuration.ConfigurationSection |
getVariables(VariableScope scope) |
int |
getVerticalSearchDistance() |
Wand |
getWand() |
org.bukkit.Location |
getWandLocation()
Currently return the cast source location, but in the future may change
to return only the wand location, or null if this spell was not cast with
a wand.
|
int |
getWorkAllowed() |
org.bukkit.configuration.ConfigurationSection |
getWorkingParameters() |
org.bukkit.World |
getWorld() |
boolean |
hasBreakPermission(org.bukkit.block.Block block) |
boolean |
hasBuildPermission(org.bukkit.block.Block block) |
boolean |
hasEffects(String key) |
boolean |
hasHandlers() |
boolean |
isBreakable(org.bukkit.block.Block block) |
boolean |
isConsumeFree() |
boolean |
isDestructible(org.bukkit.block.Block block) |
boolean |
isIndestructible(org.bukkit.block.Block block) |
boolean |
isOkToStandIn(org.bukkit.block.Block block) |
boolean |
isOkToStandIn(org.bukkit.Material mat)
Deprecated.
|
boolean |
isOkToStandOn(org.bukkit.block.Block block) |
boolean |
isOkToStandOn(org.bukkit.Material mat)
Deprecated.
|
boolean |
isPassthrough(org.bukkit.block.Block block) |
boolean |
isPassthrough(org.bukkit.Material material)
Deprecated.
|
boolean |
isReflective(org.bukkit.block.Block block) |
boolean |
isTransparent(org.bukkit.block.Block block) |
boolean |
isTransparent(org.bukkit.Material material)
Deprecated.
|
boolean |
isWater(org.bukkit.Material mat) |
void |
messageTargets(String messageKey) |
String |
parameterize(String command) |
String |
parameterizeMessage(String message)
Deprecated.
|
void |
performedActions(int count) |
void |
playEffects(String key) |
void |
playEffects(String key,
float scale) |
void |
playEffects(String key,
float scale,
org.bukkit.block.Block sourceBlock) |
void |
playEffects(String effectName,
float scale,
org.bukkit.Location source,
org.bukkit.entity.Entity sourceEntity,
org.bukkit.Location target,
org.bukkit.entity.Entity targetEntity) |
void |
playEffects(String effectName,
float scale,
org.bukkit.Location source,
org.bukkit.entity.Entity sourceEntity,
org.bukkit.Location target,
org.bukkit.entity.Entity targetEntity,
org.bukkit.block.Block sourceBlock) |
SpellResult |
processHandlers() |
void |
registerBreakable(org.bukkit.block.Block block,
double breakable) |
double |
registerBreaking(org.bukkit.block.Block block,
double breakAmount) |
void |
registerDamaged(org.bukkit.entity.Entity entity) |
void |
registerFakeBlock(org.bukkit.block.Block block,
Collection<WeakReference<org.bukkit.entity.Player>> players) |
void |
registerForUndo(org.bukkit.block.Block block) |
void |
registerForUndo(org.bukkit.entity.Entity entity) |
void |
registerForUndo(Runnable runnable) |
void |
registerModified(org.bukkit.entity.Entity entity) |
void |
registerModifier(org.bukkit.entity.Entity entity,
MageModifier modifier) |
void |
registerModifierForRemoval(org.bukkit.entity.Entity entity,
String modifierKey) |
void |
registerMoved(org.bukkit.entity.Entity entity) |
void |
registerPotionEffectForRemoval(org.bukkit.entity.Entity entity,
org.bukkit.potion.PotionEffectType potionEffectType) |
void |
registerPotionEffects(org.bukkit.entity.Entity entity) |
void |
registerReflective(org.bukkit.block.Block block,
double reflectivity) |
void |
registerVelocity(org.bukkit.entity.Entity entity) |
void |
retarget(double range,
double fov,
double closeRange,
double closeFOV,
boolean useHitbox) |
void |
retarget(double range,
double fov,
double closeRange,
double closeFOV,
boolean useHitbox,
int yOffset,
boolean targetSpaceRequired,
int targetMinOffset) |
void |
sendMessage(String message) |
void |
sendMessageKey(String key) |
void |
sendMessageKey(String key,
String message) |
void |
setBrush(MaterialBrush brush) |
void |
setCastData(String key,
Object value) |
void |
setDestructible(MaterialSet destructible) |
void |
setDirection(org.bukkit.util.Vector direction) |
void |
setIndestructible(MaterialSet indestructible) |
void |
setInitialResult(SpellResult result) |
void |
setPreviousBlock(org.bukkit.block.Block previous) |
void |
setResult(SpellResult result) |
void |
setSpellParameters(org.bukkit.configuration.ConfigurationSection parameters) |
void |
setTargetBlock(org.bukkit.block.Block targetBlock) |
void |
setTargetCenterLocation(org.bukkit.Location location) |
void |
setTargetedLocation(org.bukkit.Location location) |
void |
setTargetEntity(org.bukkit.entity.Entity targetEntity) |
void |
setTargetLocation(org.bukkit.Location targetLocation) |
void |
setTargetName(String name) |
void |
setTargetsCaster(boolean target) |
void |
setTargetSourceLocation(org.bukkit.Location targetLocation) |
void |
setWorkAllowed(int work) |
void |
showMessage(String message) |
void |
showMessage(String key,
String def) |
boolean |
teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance) |
boolean |
teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall) |
boolean |
teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall,
boolean safe) |
boolean |
teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall,
boolean safe,
boolean teleportVehicle) |
void |
unregisterBreaking(org.bukkit.block.Block block) |
void |
updateBlock(org.bukkit.block.Block block) |
void |
updateLastTriggerTime() |
canTarget, canTarget, checkWand, getActiveProperties, getAttribute, getLogger, getMessage, getMessage, getVariable, isTargetablegetEffectColor, getEffectParticle, getName, setLocation, trackEffects@Nullable org.bukkit.entity.Entity getEntity()
getEntity in interface EffectContext@Nullable org.bukkit.entity.LivingEntity getLivingEntity()
getLivingEntity in interface EffectContext@Nullable org.bukkit.Location getLocation()
getLocation in interface EffectContext@Nullable org.bukkit.Location getTargetLocation()
getTargetLocation in interface EffectContext@Nullable org.bukkit.Location getTargetCenterLocation()
void setTargetCenterLocation(org.bukkit.Location location)
@Nullable org.bukkit.Location getTargetSourceLocation()
@Nullable org.bukkit.util.Vector getDirection()
org.bukkit.block.BlockFace getFacingDirection()
void setDirection(org.bukkit.util.Vector direction)
@Nullable org.bukkit.World getWorld()
@Nullable org.bukkit.plugin.Plugin getPlugin()
@Nullable org.bukkit.Location getEyeLocation()
getEyeLocation in interface EffectContext@Nullable org.bukkit.Location getWandLocation()
getWandLocation in interface EffectContext@Nullable org.bukkit.Location getCastLocation()
getCastLocation in interface EffectContext@Nullable org.bukkit.block.Block getTargetBlock()
@Nullable org.bukkit.block.Block getInteractBlock()
@Nullable org.bukkit.entity.Entity getTargetEntity()
getTargetEntity in interface EffectContextvoid setTargetEntity(org.bukkit.entity.Entity targetEntity)
void setTargetLocation(org.bukkit.Location targetLocation)
void setTargetSourceLocation(org.bukkit.Location targetLocation)
void setTargetBlock(org.bukkit.block.Block targetBlock)
@Nonnull Mage getMage()
getMage in interface MageContext@Nullable Wand getWand()
getWand in interface MageContextCollection<EffectPlayer> getEffects(String key)
boolean hasEffects(String key)
@Nonnull MageController getController()
getController in interface EffectContextvoid registerForUndo(Runnable runnable)
void registerForUndo(org.bukkit.entity.Entity entity)
void registerForUndo(org.bukkit.block.Block block)
void registerModified(org.bukkit.entity.Entity entity)
void registerDamaged(org.bukkit.entity.Entity entity)
void clearAttachables(org.bukkit.block.Block block)
void updateBlock(org.bukkit.block.Block block)
void registerVelocity(org.bukkit.entity.Entity entity)
void registerMoved(org.bukkit.entity.Entity entity)
void registerPotionEffects(org.bukkit.entity.Entity entity)
void registerPotionEffectForRemoval(org.bukkit.entity.Entity entity,
org.bukkit.potion.PotionEffectType potionEffectType)
void registerModifier(org.bukkit.entity.Entity entity,
MageModifier modifier)
void registerModifierForRemoval(org.bukkit.entity.Entity entity,
String modifierKey)
void registerBreakable(org.bukkit.block.Block block,
double breakable)
void registerReflective(org.bukkit.block.Block block,
double reflectivity)
double registerBreaking(org.bukkit.block.Block block,
double breakAmount)
void unregisterBreaking(org.bukkit.block.Block block)
void registerFakeBlock(org.bukkit.block.Block block,
Collection<WeakReference<org.bukkit.entity.Player>> players)
org.bukkit.block.Block getPreviousBlock()
org.bukkit.block.Block getPreviousPreviousBlock()
void setPreviousBlock(org.bukkit.block.Block previous)
boolean isIndestructible(org.bukkit.block.Block block)
boolean hasBuildPermission(org.bukkit.block.Block block)
boolean hasBreakPermission(org.bukkit.block.Block block)
boolean isBreakable(org.bukkit.block.Block block)
boolean isReflective(org.bukkit.block.Block block)
void clearBreakable(org.bukkit.block.Block block)
void clearReflective(org.bukkit.block.Block block)
void playEffects(String key)
void playEffects(String key, float scale)
void playEffects(String key, float scale, org.bukkit.block.Block sourceBlock)
void playEffects(String effectName, float scale, org.bukkit.Location source, org.bukkit.entity.Entity sourceEntity, org.bukkit.Location target, org.bukkit.entity.Entity targetEntity)
void playEffects(String effectName, float scale, org.bukkit.Location source, org.bukkit.entity.Entity sourceEntity, org.bukkit.Location target, org.bukkit.entity.Entity targetEntity, org.bukkit.block.Block sourceBlock)
void cancelEffects()
cancelEffects in interface EffectContextCollection<EffectPlay> getCurrentEffects()
getCurrentEffects in interface EffectContext@Nullable org.bukkit.Location findPlaceToStand(org.bukkit.Location target, int verticalSearchDistance)
@Nullable org.bukkit.Location findPlaceToStand(org.bukkit.Location target, int verticalSearchDistance, boolean goUp)
void castMessage(String message)
void sendMessage(String message)
void castMessageKey(String key)
void sendMessageKey(String key)
void showMessage(String message)
void setTargetedLocation(org.bukkit.Location location)
org.bukkit.block.Block findBlockUnder(org.bukkit.block.Block block)
org.bukkit.block.Block findSpaceAbove(org.bukkit.block.Block block)
@Deprecated boolean isTransparent(org.bukkit.Material material)
boolean isTransparent(org.bukkit.block.Block block)
@Deprecated boolean isPassthrough(org.bukkit.Material material)
boolean isPassthrough(org.bukkit.block.Block block)
boolean isDestructible(org.bukkit.block.Block block)
boolean areAnyDestructible(org.bukkit.block.Block block)
@Nullable MaterialBrush getBrush()
void setBrush(MaterialBrush brush)
Collection<org.bukkit.entity.Entity> getTargetedEntities()
void messageTargets(String messageKey)
Random getRandom()
UndoList getUndoList()
void setTargetName(String name)
String getTargetName()
int getWorkAllowed()
void setWorkAllowed(int work)
void addWork(int work)
void performedActions(int count)
int getActionsPerformed()
void finish()
void retarget(double range,
double fov,
double closeRange,
double closeFOV,
boolean useHitbox)
void retarget(double range,
double fov,
double closeRange,
double closeFOV,
boolean useHitbox,
int yOffset,
boolean targetSpaceRequired,
int targetMinOffset)
CastContext getBaseContext()
CastContext getParent()
boolean teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance)
boolean teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall)
boolean teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall,
boolean safe)
boolean teleport(org.bukkit.entity.Entity entity,
org.bukkit.Location location,
int verticalSearchDistance,
boolean preventFall,
boolean safe,
boolean teleportVehicle)
@Deprecated boolean allowPassThrough(org.bukkit.Material material)
boolean allowPassThrough(org.bukkit.block.Block block)
int getVerticalSearchDistance()
@Deprecated boolean isOkToStandIn(org.bukkit.Material mat)
boolean isOkToStandIn(org.bukkit.block.Block block)
boolean isWater(org.bukkit.Material mat)
@Deprecated boolean isOkToStandOn(org.bukkit.Material mat)
boolean isOkToStandOn(org.bukkit.block.Block block)
@Nullable @Deprecated Set<org.bukkit.Material> getMaterialSet(String key)
void setSpellParameters(org.bukkit.configuration.ConfigurationSection parameters)
SpellResult getResult()
void setInitialResult(SpellResult result)
void setResult(SpellResult result)
void addResult(SpellResult result)
boolean getTargetsCaster()
void setTargetsCaster(boolean target)
TargetType getTargetType()
boolean canContinue(org.bukkit.Location location)
boolean canCast(org.bukkit.Location location)
@Deprecated String parameterizeMessage(String message)
boolean isConsumeFree()
void addHandler(ActionHandler handler)
SpellResult processHandlers()
boolean hasHandlers()
long getStartTime()
long getLastTriggerTime()
void updateLastTriggerTime()
@Nonnull org.bukkit.configuration.ConfigurationSection getVariables(VariableScope scope)
@Nonnull org.bukkit.configuration.ConfigurationSection getVariables()
@Nonnull org.bukkit.configuration.ConfigurationSection getAllVariables()
org.bukkit.configuration.ConfigurationSection getWorkingParameters()
ActionHandler getRootHandler()
void setDestructible(MaterialSet destructible)
void setIndestructible(MaterialSet indestructible)
@Nullable CasterProperties getCasterProperties(String propertyType)
@Nullable CasterProperties getTargetCasterProperties(String propertyType)
Copyright © 2021 elMakers. All rights reserved.