public interface Spell extends SpellTemplate
Each Spell is based on a SpellTemplate, which are defined by the spells configuration files.
Every spell uses a specific Class that must extend from com.elmakers.mine.bukkit.plugins.magic.spell.Spell.
To create a new custom spell from scratch, you must also implement the MageSpell interface.
| Modifier and Type | Method and Description |
|---|---|
boolean |
brushIsErase() |
boolean |
canCast(org.bukkit.Location location) |
boolean |
cancel()
Signal that this spell was cancelled.
|
boolean |
cancelOnCastOther() |
double |
cancelOnDamage() |
boolean |
cancelOnDeactivate() |
boolean |
cancelOnDeath() |
boolean |
cancelOnNoPermission() |
boolean |
cancelOnNoWand() |
boolean |
cancelOnWorldChange() |
boolean |
cancelSelection()
Cancel a selection in-progress for a two-click selection spell (like Architect magic)
|
boolean |
canContinue(org.bukkit.Location location) |
boolean |
canTarget(org.bukkit.entity.Entity entity) |
boolean |
cast() |
boolean |
cast(org.bukkit.configuration.ConfigurationSection parameters) |
boolean |
cast(org.bukkit.configuration.ConfigurationSection parameters,
org.bukkit.Location defaultLocation) |
boolean |
cast(String[] parameters) |
boolean |
cast(String[] parameters,
org.bukkit.Location defaultLocation) |
boolean |
cast(Wand wand,
org.bukkit.configuration.ConfigurationSection parameters) |
void |
castMessage(String message) |
void |
castMessageKey(String key,
String message) |
void |
clearCooldown() |
void |
finish(CastContext context) |
MaterialBrush |
getBrush() |
double |
getChargesRemaining() |
MageController |
getController() |
CastContext |
getCurrentCast() |
org.bukkit.util.Vector |
getDirection() |
org.bukkit.Color |
getEffectColor() |
MaterialAndData |
getEffectMaterial() |
String |
getEffectParticle() |
org.bukkit.entity.Entity |
getEntity() |
org.bukkit.Location |
getEyeLocation() |
org.bukkit.configuration.ConfigurationSection |
getHandlerParameters(String handlerKey) |
long |
getLastCast() |
org.bukkit.Location |
getLocation() |
String |
getMessage(String messageKey) |
long |
getProgressLevel() |
long |
getRemainingCooldown() |
CastingCost |
getRequiredCost() |
org.bukkit.entity.Entity |
getTargetEntity() |
org.bukkit.Location |
getTargetLocation() |
org.bukkit.configuration.ConfigurationSection |
getVariables() |
VariableScope |
getVariableScope(String variableName) |
org.bukkit.configuration.ConfigurationSection |
getWorkingParameters() |
boolean |
hasBrushOverride() |
boolean |
hasHandlerParameters(String handlerKey) |
boolean |
isActive() |
boolean |
isCancellable() |
boolean |
isDisguiseRestricted() |
boolean |
isEnabled() |
boolean |
isPvpRestricted() |
void |
messageTargets(String messageKey) |
void |
playEffects(String effectName) |
void |
playEffects(String effectName,
CastContext context) |
void |
playEffects(String effectName,
CastContext context,
float scale) |
boolean |
reactivate() |
void |
reduceRemainingCooldown(long ms) |
default void |
reloadParameters(CastContext context) |
boolean |
requiresBreakPermission() |
boolean |
requiresBuildPermission() |
void |
sendMessage(String message) |
void |
sendMessageKey(String key,
String message) |
void |
setEnabled(boolean enabled) |
void |
setRemainingCooldown(long ms) |
boolean |
stop()
Like a quiet version of cancel() - at some point cancel, stop and deactivate should all get cleaned up.
|
void |
target() |
addLore, createMageSpell, createSpell, disableManaRegenerationWhenActive, getActiveCosts, getAlias, getCastCount, getCategory, getCategoryPermissionNode, getChargeRegeneration, getColor, getConfiguration, getCooldown, getCooldownDescription, getCost, getCosts, getCreator, getCreatorId, getDescription, getDisabledIcon, getDisabledIconURL, getDuration, getDurationDescription, getEarns, getEffects, getEffects, getExtendedDescription, getGlyph, getIcon, getIconURL, getKey, getLevelDescription, getMageCooldownDescription, getMaxCharges, getMaxProgressLevel, getName, getParameterOptions, getParameters, getPermissionNode, getPrerequisiteSpells, getRange, getRequiredUpgradeCasts, getRequiredUpgradePath, getRequiredUpgradeTags, getRequirements, getSpellKey, getSpellParameters, getSpellsToRemove, getTriggers, getUpgrade, getUpgradeDescription, getUsage, getWorth, hasAnyTag, hasCastPermission, hasIcon, hasTag, isHidden, isPassive, isQuickCast, isQuiet, isScheduledUndo, isToggleable, isUndoable, loadPrerequisites, loadTemplate, setCastCount, showBrush, showUndoable, usesBrush, usesBrushSelectioncompareTogetConsumeReduction, getCostReduction, getCostScale, isConsumeFree, isCostFreeMageController getController()
boolean cast()
boolean cast(@Nullable org.bukkit.configuration.ConfigurationSection parameters, @Nullable org.bukkit.Location defaultLocation)
boolean cast(@Nullable org.bukkit.configuration.ConfigurationSection parameters)
boolean cast(@Nullable Wand wand, @Nullable org.bukkit.configuration.ConfigurationSection parameters)
@Nullable org.bukkit.Location getLocation()
org.bukkit.entity.Entity getEntity()
org.bukkit.Location getEyeLocation()
void target()
@Nullable org.bukkit.Location getTargetLocation()
@Nullable org.bukkit.entity.Entity getTargetEntity()
org.bukkit.util.Vector getDirection()
boolean canTarget(org.bukkit.entity.Entity entity)
boolean isActive()
boolean hasBrushOverride()
boolean canContinue(org.bukkit.Location location)
boolean canCast(org.bukkit.Location location)
void clearCooldown()
void reduceRemainingCooldown(long ms)
void setRemainingCooldown(long ms)
long getRemainingCooldown()
@Nullable CastingCost getRequiredCost()
void messageTargets(String messageKey)
CastContext getCurrentCast()
void playEffects(String effectName)
void playEffects(String effectName, CastContext context)
void playEffects(String effectName, CastContext context, float scale)
boolean requiresBuildPermission()
boolean requiresBreakPermission()
boolean isPvpRestricted()
boolean isDisguiseRestricted()
void sendMessage(String message)
void castMessage(String message)
MaterialAndData getEffectMaterial()
@Nullable org.bukkit.Color getEffectColor()
@Nullable MaterialBrush getBrush()
boolean brushIsErase()
boolean isCancellable()
org.bukkit.configuration.ConfigurationSection getWorkingParameters()
void finish(CastContext context)
double cancelOnDamage()
boolean cancelOnWorldChange()
boolean cancelOnCastOther()
boolean cancelOnDeath()
boolean cancelOnDeactivate()
boolean hasHandlerParameters(String handlerKey)
@Nullable org.bukkit.configuration.ConfigurationSection getHandlerParameters(String handlerKey)
long getProgressLevel()
boolean cancelOnNoPermission()
boolean cancelOnNoWand()
boolean reactivate()
@Nonnull org.bukkit.configuration.ConfigurationSection getVariables()
default void reloadParameters(CastContext context)
boolean cancel()
This will not actually cancel any pending spell casts (batches) of this spell, for that you will need Mage.cancelPending
boolean stop()
boolean cancelSelection()
Will call cancel() if selection was cancelled.
boolean isEnabled()
void setEnabled(boolean enabled)
long getLastCast()
double getChargesRemaining()
@Nullable VariableScope getVariableScope(String variableName)
Copyright © 2021 elMakers. All rights reserved.