public interface Mage extends CostReducer, CooldownReducer
The COMMAND Mage has no Location, so is generally
limited in what it can cast unless the "p" location parameters are used, e.g.
cast blast pworld world px 0 py 70 pz 0
This will case "blast" in the center of the world "world" using the "COMMAND" Mage.
Some Spell implementations will absolutely require a Player (such as StashSpell), and so will always fail unless cast by a player or with "castp".
| Modifier and Type | Method and Description |
|---|---|
void |
activateClasses()
Restores any attributes managed by unlocked classes.
|
void |
activateGUI(GUIAction action,
org.bukkit.inventory.Inventory inventory) |
void |
activateModifiers() |
void |
activateSpell(Spell spell)
Set a Spell as "active".
|
boolean |
addBatch(Batch batch) |
void |
addCurrency(String type,
double delta) |
void |
addCurrency(String type,
double delta,
boolean quiet) |
boolean |
addModifier(String key) |
boolean |
addModifier(String key,
org.bukkit.configuration.ConfigurationSection properties) |
boolean |
addModifier(String key,
int duration) |
boolean |
addModifier(String key,
int duration,
org.bukkit.configuration.ConfigurationSection properties) |
void |
addSkillPoints(int delta) |
void |
addTag(String tag) |
boolean |
addToStoredInventory(org.bukkit.inventory.ItemStack itemStack) |
void |
addUndoBatch(UndoBatch batch) |
boolean |
addVaultCurrency(double delta) |
boolean |
allowContainerCopy() |
void |
attributesUpdated()
Notify this Mage that it has had some attributes updated.
|
Batch |
cancelPending()
Cancel any pending construction batches.
|
Batch |
cancelPending(boolean force) |
Batch |
cancelPending(String spellKey) |
Batch |
cancelPending(String spellKey,
boolean force) |
Batch |
cancelPending(String spellKey,
boolean force,
boolean nonBatched) |
boolean |
canCraft(String recipeKey) |
boolean |
canUse(org.bukkit.inventory.ItemStack item) |
void |
castMessage(String message)
Send a message to this Mage.
|
Wand |
checkWand()
Force a re-check of the current active wand vs the item the player is holding.
|
void |
clearCooldown() |
void |
clearFallProtection() |
void |
clearSuperProtection() |
boolean |
commit()
Commit this Mage's UndoQueue.
|
boolean |
consumeBlock(MaterialAndData block,
boolean allowVariants) |
void |
continueGUI(GUIAction action,
org.bukkit.inventory.Inventory inventory) |
void |
damagedBy(org.bukkit.entity.Entity enity,
double damage) |
void |
deactivate() |
void |
deactivateAllSpells()
Deactivate all active spells for this Mage.
|
void |
deactivateAllSpells(boolean force,
boolean quiet) |
void |
deactivateAllSpells(boolean force,
boolean quiet,
String exceptSpellKey) |
void |
deactivateClasses()
This will remove any entity attributes added by unlocked classes.
|
void |
deactivateGUI() |
void |
deactivateModifiers() |
void |
deactivateSpell(Spell spell)
Deactivate a currently active spell.
|
void |
debugBrain(org.bukkit.command.CommandSender sender) |
void |
debugPermissions(org.bukkit.command.CommandSender sender,
Spell spell) |
void |
disable() |
void |
enableFallProtection(int ms) |
void |
enableFallProtection(int ms,
int count,
Spell protector) |
void |
enableFallProtection(int ms,
Spell protector) |
void |
enableSuperProtection(int ms) |
Wand |
findWand(String template)
Find a wand with a particular template in the Mage's inventory.
|
int |
finishPendingUndo() |
MageClass |
getActiveClass() |
GUIAction |
getActiveGUI() |
CasterProperties |
getActiveProperties()
This will return properties for the mage's active wand, if holding one, or if not then the active class.
|
Set<Spell> |
getActiveSpells() |
Wand |
getActiveWand()
Get the active Wand being used by this Mage.
|
Double |
getAttribute(String attributeKey) |
Wand |
getBoundWand(String template)
Get a bound wand.
|
WandUpgradePath |
getBoundWandPath(String templateKey) |
List<? extends Wand> |
getBoundWands() |
MaterialBrush |
getBrush() |
CasterProperties |
getCasterProperties(String propertyType) |
org.bukkit.Location |
getCastLocation()
Gets the source location of spells cast by this mage, which were
not cast with a wand.
|
MageClass |
getClass(String key) |
Collection<MageClass> |
getClasses() |
Collection<String> |
getClassKeys() |
ClientPlatform |
getClientPlatform() |
org.bukkit.command.CommandSender |
getCommandSender()
Get the CommandSender backed by this Mage.
|
float |
getConstructionMultiplier() |
MageContext |
getContext() |
MageController |
getController() |
float |
getCooldownReduction()
Get the percent cooldown reduction, from 0.0 to 1.0
|
float |
getCostReduction()
Get the percent cost reduction, from 0.0 to 1.0
|
long |
getCreatedTime() |
double |
getCurrency(String type) |
float |
getDamageMultiplier()
Returns power-based damage combined with overall damage multipliers.
|
double |
getDamageMultiplier(String damageType)
Returns the combination of power-based damage multiplier, overall damage multiplier, and type-specific damage
multiplier.
|
Collection<org.bukkit.entity.Entity> |
getDamagers() |
org.bukkit.configuration.ConfigurationSection |
getData() |
org.bukkit.command.CommandSender |
getDebugger() |
int |
getDebugLevel() |
org.bukkit.util.Vector |
getDirection()
Get the direction this Mage is facing.
|
String |
getDisplayName() |
float |
getEarnMultiplier()
Deprecated.
Specify a currency, use "sp" for spell points
|
double |
getEarnMultiplier(String currency) |
org.bukkit.Color |
getEffectColor() |
int |
getEffectiveManaMax() |
int |
getEffectiveManaRegeneration() |
String |
getEffectParticleName() |
org.bukkit.entity.Entity |
getEntity()
Get the Entity instance backed by this Mage.
|
EntityData |
getEntityData() |
int |
getExperience() |
org.bukkit.Location |
getEyeLocation()
Get the eye location of this Mage.
|
double |
getHealth() |
String |
getId()
Get the unique id of this mage.
|
org.bukkit.inventory.Inventory |
getInventory() |
org.bukkit.inventory.ItemStack |
getItem(int slot) |
int |
getItemCount(org.bukkit.inventory.ItemStack item) |
int |
getItemCount(org.bukkit.inventory.ItemStack item,
boolean allowDamaged) |
org.bukkit.block.Block |
getLastBlockBroken() |
double |
getLastBowPull() |
double |
getLastDamage() |
double |
getLastDamageDealt() |
String |
getLastDamageDealtType() |
org.bukkit.entity.Entity |
getLastDamager() |
org.bukkit.entity.Entity |
getLastDamageTarget() |
String |
getLastDamageType()
Get the last damage type done to this Mage.
|
org.bukkit.Location |
getLastDeathLocation() |
double |
getLastFallDistance() |
int |
getLastHeldMapId() |
org.bukkit.entity.EntityType |
getLastProjectileType() |
Long |
getLastTrigger(String trigger) |
UndoList |
getLastUndoList() |
int |
getLevel() |
org.bukkit.entity.LivingEntity |
getLivingEntity()
Get the LivingEntity instance backed by this Mage.
|
org.bukkit.Location |
getLocation()
Get the location of this Mage.
|
List<LostWand> |
getLostWands() |
float |
getMagePowerBonus() |
float |
getMana() |
int |
getManaMax() |
int |
getManaRegeneration() |
double |
getMaxHealth() |
MageModifier |
getModifier(String key) |
Set<String> |
getModifierKeys() |
String |
getName()
Get the name of this mage.
|
Wand |
getOffhandWand() |
org.bukkit.Location |
getOffhandWandLocation() |
List<CastParameter> |
getOverrides(String spellKey) |
Collection<Batch> |
getPendingBatches()
Return the list of pending construction batches for this Mage.
|
org.bukkit.entity.Player |
getPlayer()
Get the Player instance backed by this Mage.
|
float |
getPower() |
float |
getPowerMultiplier() |
String |
getPreferredResourcePack() |
CasterProperties |
getProperties() |
float |
getRadiusMultiplier() |
float |
getRangeMultiplier() |
long |
getRemainingCooldown() |
Set<org.bukkit.Material> |
getRestrictedMaterials()
Deprecated.
|
MaterialSet |
getRestrictedMaterialSet() |
int |
getSkillPoints() |
Wand |
getSoulWand()
Deprecated.
|
MageSpell |
getSpell(String key)
Return a Spell for this Mage, which can be used to programatically
cast or modify a Spell on behalf of this Mage.
|
Collection<Spell> |
getSpells()
Return all of the Spell objects registered to this Mage.
|
float |
getSPMultiplier()
Deprecated.
Use getEarnMultiplier instead.
|
org.bukkit.entity.Entity |
getTopDamager() |
UndoQueue |
getUndoQueue() |
org.bukkit.configuration.ConfigurationSection |
getVariables() |
double |
getVaultBalance() |
double |
getVehicleMovementDirection()
This method returns a positive number if the player is moving
forward while in a vehicle, negative if moving backward.
|
double |
getVehicleStrafeDirection()
This method returns a positive number if the player is strafing
right while in a vehicle, negative if strafing left.
|
org.bukkit.util.Vector |
getVelocity()
Return the current movement vector of this entity, in blocks per second.
|
org.bukkit.Location |
getWandLocation()
Currently returns the cast location, even when not holding a wand,
but this behavior is subject to change and in the future this may
return null if the Mage is not holding a Wand.
|
void |
giveExperience(int xp) |
void |
giveItem(org.bukkit.inventory.ItemStack item) |
void |
giveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand) |
boolean |
giveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand,
boolean allowDropping) |
boolean |
hasBreakPermission(org.bukkit.block.Block block) |
boolean |
hasBuildPermission(org.bukkit.block.Block block) |
boolean |
hasCastPermission(Spell spell) |
boolean |
hasClassUnlocked(String key) |
boolean |
hasItem(org.bukkit.inventory.ItemStack item) |
boolean |
hasItem(org.bukkit.inventory.ItemStack item,
boolean allowVariants) |
boolean |
hasLocation() |
boolean |
hasModifier(String key) |
boolean |
hasPending() |
boolean |
hasResourcePack() |
boolean |
hasSpell(String key)
Check to see if this Mage has a certain spell, generally meaning they
have cast it at least once.
|
boolean |
hasStoredInventory() |
boolean |
hasTag(String tag) |
boolean |
isAtMaxCurrency(String type) |
boolean |
isAtMaxSkillPoints() |
boolean |
isAutomaton() |
boolean |
isBlocked(double angle) |
boolean |
isBypassEnabled() |
boolean |
isConsumeFree() |
boolean |
isCooldownFree()
Check if cooldowns should be bypassed completely.
|
boolean |
isCostFree() |
boolean |
isDead() |
boolean |
isDestructible(org.bukkit.block.Block block) |
boolean |
isGlidingAllowed() |
boolean |
isIgnoredByMobs() |
boolean |
isIndestructible(org.bukkit.block.Block block) |
boolean |
isJumping() |
boolean |
isLaunchingProjectile() |
boolean |
isLoading() |
boolean |
isOnline() |
boolean |
isPlayer() |
boolean |
isPVPAllowed(org.bukkit.Location location) |
boolean |
isQuiet() |
boolean |
isReflected(double angle) |
boolean |
isResourcePackEnabled() |
boolean |
isRestricted(org.bukkit.Material material) |
boolean |
isRestricted(org.bukkit.Material material,
Short data) |
boolean |
isSneaking() |
boolean |
isStealth() |
boolean |
isSuperPowered() |
boolean |
isSuperProtected() |
boolean |
isUrlIconsEnabled() |
boolean |
isValid() |
boolean |
isVanished() |
boolean |
isVehicleJumping()
Check to see if a player is trying to jump while in a vehicle
|
boolean |
load(MageData data) |
boolean |
lockClass(String key) |
void |
onCast(Spell spell,
SpellResult result)
This should be called by a Spell upon
casting, to notify the Mage that it cast a spell.
|
String |
parameterize(String text) |
String |
parameterize(String command,
String prefix)
Deprecated.
|
String |
parameterizeMessage(String command)
Deprecated.
|
void |
playSoundEffect(SoundEffect sound) |
boolean |
prepareForUndo(UndoList blocks) |
void |
reduceRemainingCooldown(long ms) |
void |
refundBlock(MaterialAndData block) |
void |
registerEvent(SpellEventType type,
org.bukkit.event.Listener spell) |
boolean |
registerForUndo(UndoList blocks) |
boolean |
removeClass(String key) |
void |
removeCurrency(String type,
double delta) |
void |
removeCurrency(String type,
double delta,
boolean quiet) |
void |
removed() |
void |
removeExperience(int xp) |
int |
removeItem(org.bukkit.inventory.ItemStack item) |
int |
removeItem(org.bukkit.inventory.ItemStack item,
boolean allowVariants) |
void |
removeItemsWithTag(String tag) |
void |
removeMana(float mana) |
MageModifier |
removeModifier(String key) |
boolean |
removeVaultCurrency(double delta) |
boolean |
restoreWand() |
boolean |
save(MageData data) |
void |
sendDebugMessage(String message) |
void |
sendDebugMessage(String message,
int level) |
void |
sendMessage(String message)
Send a message to this Mage.
|
boolean |
setActiveClass(String key)
Sets the active class.
|
void |
setArmorItem(int armorSlot,
org.bukkit.inventory.ItemStack item) |
void |
setBypassEnabled(boolean enable) |
void |
setCooldownFree(boolean cooldownFree) |
void |
setCostFree(boolean costFree) |
void |
setCurrency(String type,
double amount) |
void |
setDebugger(org.bukkit.command.CommandSender debugger) |
void |
setDebugLevel(int level) |
void |
setGlidingAllowed(boolean allow) |
boolean |
setItem(int slot,
org.bukkit.inventory.ItemStack item) |
void |
setLastDamageDealtType(String damageType) |
void |
setLastDamageType(String damageType)
Set the damage type that was last given to a Mage.
|
void |
setLaunchingProjectile(boolean launching)
Set this when launching vanilla projectiles, if you don't want the launch intercepted
by the bow/wand handler.
|
void |
setLevel(int level) |
void |
setLocation(org.bukkit.Location location) |
void |
setMagePowerBonus(float magePowerBonus) |
void |
setMana(float mana) |
void |
setPowerMultiplier(float power) |
void |
setQuiet(boolean quiet) |
void |
setRemainingCooldown(long ms) |
void |
setSkillPoints(int sp) |
void |
setTarget(org.bukkit.entity.Entity entity) |
void |
setVanished(boolean vanished) |
void |
showHoloText(org.bukkit.Location location,
String text,
int duration)
Deprecated.
|
void |
tick() |
boolean |
toggleSpellEnabled(String spellKey) |
boolean |
trigger(String trigger) |
boolean |
tryGiveItem(org.bukkit.inventory.ItemStack item)
Will not drop the item on the ground, unlike giveItem
|
boolean |
tryGiveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand) |
boolean |
tryToOwn(Wand wand) |
boolean |
unbind(String template) |
void |
unbind(Wand wand) |
void |
unbindAll() |
UndoList |
undo()
Undo the last construction performed by this Mage.
|
UndoList |
undo(org.bukkit.block.Block block)
Undo the last construction performed by this Mage against the
given Block
|
void |
undoScheduled() |
void |
undoScheduled(String spellKey) |
MageClass |
unlockClass(String key) |
void |
unregisterEvent(SpellEventType type,
org.bukkit.event.Listener spell) |
void |
updateMana() |
void |
updatePassiveEffects() |
getConsumeReduction, getCostScaleCollection<Batch> getPendingBatches()
String getName()
String getDisplayName()
String getId()
org.bukkit.Location getLocation()
org.bukkit.Location getEyeLocation()
@Nullable org.bukkit.Location getCastLocation()
@Nullable org.bukkit.Location getWandLocation()
@Nullable org.bukkit.Location getOffhandWandLocation()
org.bukkit.util.Vector getDirection()
@Nullable org.bukkit.entity.Player getPlayer()
This may return null for Command block or console-based mages.
A Spell should detect this and, if the Spell absolutely requires a Player, should return SpellResult.PLAYER_REQUIRED.
Spells should attempt to avoid requiring a player, do not use the Player object to get a Location or Vector direction, generally try to use the Spell or Mage methods for that. This will make sure that parameter overrides and command-block usage function properly.
A Player should only be needed if a Spell does something very Player-specific, such as open an inventory to show the Player in-game, like StashSpell does.
org.bukkit.entity.Entity getEntity()
This may be a Player or other Entity, or null in the case of a CommandSender-based Mage, like an Automaton.
@Nullable org.bukkit.entity.LivingEntity getLivingEntity()
This is basically a helper wrapper for getEntity that does a typecheck for you.
org.bukkit.command.CommandSender getCommandSender()
This should generally always be non-null, and can be used to send a message to the Mage. This may show in the server console, Player chat, or get eaten by a Command block.
void sendMessage(String message)
This will respect the global plugin message cooldown, message display settings and the Mage's active Wand "quiet" setting.
A Wand "quiet" setting of 2 will disable these messages.
message - The message to send.void sendDebugMessage(String message)
void sendDebugMessage(String message, int level)
void castMessage(String message)
This will respect the global plugin "cast" message cooldown, message display settings and the Mage's active Wand "quiet" setting.
A Wand "quiet" setting of 1 will disable these messages.
message - The message to send.@Nullable Batch cancelPending()
@Nullable UndoList undo()
This will restore anything changed by the last-cast construction spell, and remove that construction from the Mage's UndoQueue.
@Nullable UndoList undo(org.bukkit.block.Block block)
This will restore anything changed by the last-cast construction spell by this Mage that targeted the specific Block, even if it was not the most recent Spell cast by that Mage.
block - The block to check for modifications.boolean commit()
This will cause anything in the undo queue to become permanent- meaning other overlapping spells won't undo this construction, even if they were cast before the spells in this undo queue.
This also clears the Mage's undo queue, which may allow them to be destroyed if they are no longer active (e.g. the Player logged out).
This has no effect on the Mage's scheduled undo batches.
Wand getActiveWand()
This will generally be the Wand represented by the ItemStack held by the Player this Mage represents.
Automata and other non-Player Mages generally do not have Wands.
Wand getOffhandWand()
GUIAction getActiveGUI()
@Nullable Wand findWand(@Nonnull String template)
Wand getBoundWand(String template)
@Nullable Wand checkWand()
This may activate or deactivate a wand, or both.
@Nullable MageSpell getSpell(String key)
This will create and register the spell if the Mage has never cast it, but has permission to do so.
key - The key of the Spell to retrieve.boolean hasSpell(String key)
key - The spell keyCollection<Spell> getSpells()
This will generally be any Spells the Mage has ever cast.
void activateSpell(Spell spell)
spell - The spell to activate.void deactivateSpell(Spell spell)
If the given spell is not currently active, nothing will happen.
spell - The spell to deactivatevoid deactivateAllSpells()
void deactivateAllSpells(boolean force,
boolean quiet)
void deactivateAllSpells(boolean force,
boolean quiet,
String exceptSpellKey)
org.bukkit.configuration.ConfigurationSection getData()
boolean isCooldownFree()
CooldownReducerisCooldownFree in interface CooldownReducerfloat getCooldownReduction()
CooldownReducergetCooldownReduction in interface CooldownReducerboolean isCostFree()
isCostFree in interface CostReducerboolean isConsumeFree()
isConsumeFree in interface CostReducervoid setCostFree(boolean costFree)
void setCooldownFree(boolean cooldownFree)
float getCostReduction()
CostReducergetCostReduction in interface CostReducerlong getRemainingCooldown()
void setRemainingCooldown(long ms)
void reduceRemainingCooldown(long ms)
void clearCooldown()
boolean isSuperPowered()
boolean isSuperProtected()
boolean isIgnoredByMobs()
float getRangeMultiplier()
float getRadiusMultiplier()
float getConstructionMultiplier()
double getDamageMultiplier(String damageType)
float getDamageMultiplier()
@Nullable org.bukkit.Color getEffectColor()
float getPower()
float getPowerMultiplier()
void setPowerMultiplier(float power)
float getMagePowerBonus()
void setMagePowerBonus(float magePowerBonus)
boolean isPlayer()
boolean isOnline()
boolean isDead()
boolean isLoading()
boolean hasLocation()
void disable()
void setLocation(org.bukkit.Location location)
void onCast(Spell spell, SpellResult result)
spell - The Spell that was castresult - The result of the cast.boolean isRestricted(org.bukkit.Material material)
@Nullable @Deprecated Set<org.bukkit.Material> getRestrictedMaterials()
MaterialSet getRestrictedMaterialSet()
MageController getController()
boolean hasCastPermission(Spell spell)
boolean hasBuildPermission(org.bukkit.block.Block block)
boolean hasBreakPermission(org.bukkit.block.Block block)
boolean isPVPAllowed(org.bukkit.Location location)
boolean isIndestructible(org.bukkit.block.Block block)
boolean isDestructible(org.bukkit.block.Block block)
boolean registerForUndo(UndoList blocks)
boolean prepareForUndo(UndoList blocks)
@Nullable org.bukkit.inventory.Inventory getInventory()
int removeItem(org.bukkit.inventory.ItemStack item)
int removeItem(org.bukkit.inventory.ItemStack item,
boolean allowVariants)
boolean hasItem(org.bukkit.inventory.ItemStack item)
boolean hasItem(org.bukkit.inventory.ItemStack item,
boolean allowVariants)
boolean consumeBlock(MaterialAndData block, boolean allowVariants)
void refundBlock(MaterialAndData block)
int getItemCount(org.bukkit.inventory.ItemStack item,
boolean allowDamaged)
int getItemCount(org.bukkit.inventory.ItemStack item)
@Nullable org.bukkit.inventory.ItemStack getItem(int slot)
boolean setItem(int slot,
org.bukkit.inventory.ItemStack item)
MaterialBrush getBrush()
void removeExperience(int xp)
int getExperience()
void giveExperience(int xp)
void removeMana(float mana)
float getMana()
int getManaMax()
int getEffectiveManaMax()
void setMana(float mana)
int getManaRegeneration()
int getEffectiveManaRegeneration()
void updateMana()
int getLevel()
void setLevel(int level)
boolean addBatch(Batch batch)
void addUndoBatch(UndoBatch batch)
void registerEvent(SpellEventType type, org.bukkit.event.Listener spell)
void unregisterEvent(SpellEventType type, org.bukkit.event.Listener spell)
UndoQueue getUndoQueue()
int finishPendingUndo()
org.bukkit.Location getLastDeathLocation()
boolean hasStoredInventory()
boolean addToStoredInventory(org.bukkit.inventory.ItemStack itemStack)
void enableFallProtection(int ms)
void clearFallProtection()
void enableSuperProtection(int ms)
void clearSuperProtection()
boolean load(MageData data)
boolean save(MageData data)
void deactivate()
boolean isValid()
boolean hasPending()
boolean restoreWand()
boolean isStealth()
boolean isSneaking()
boolean isJumping()
void removed()
void tick()
void activateGUI(GUIAction action, org.bukkit.inventory.Inventory inventory)
void continueGUI(GUIAction action, org.bukkit.inventory.Inventory inventory)
void deactivateGUI()
void playSoundEffect(SoundEffect sound)
@Deprecated void showHoloText(org.bukkit.Location location, String text, int duration)
int getDebugLevel()
void setDebugLevel(int level)
void setDebugger(org.bukkit.command.CommandSender debugger)
void debugBrain(org.bukkit.command.CommandSender sender)
void debugPermissions(org.bukkit.command.CommandSender sender,
Spell spell)
org.bukkit.command.CommandSender getDebugger()
void giveItem(org.bukkit.inventory.ItemStack item)
void giveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand)
boolean giveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand,
boolean allowDropping)
void setArmorItem(int armorSlot,
org.bukkit.inventory.ItemStack item)
boolean tryGiveItem(org.bukkit.inventory.ItemStack item)
boolean tryGiveItem(org.bukkit.inventory.ItemStack item,
boolean putInHand)
void removeItemsWithTag(String tag)
void setQuiet(boolean quiet)
boolean isQuiet()
int getSkillPoints()
void addSkillPoints(int delta)
void setSkillPoints(int sp)
boolean isAtMaxSkillPoints()
double getCurrency(String type)
void addCurrency(String type, double delta)
void addCurrency(String type, double delta, boolean quiet)
void removeCurrency(String type, double delta)
void removeCurrency(String type, double delta, boolean quiet)
void setCurrency(String type, double amount)
boolean isAtMaxCurrency(String type)
@Nullable WandUpgradePath getBoundWandPath(String templateKey)
boolean unbind(String template)
void unbind(Wand wand)
void unbindAll()
void undoScheduled()
void undoScheduled(String spellKey)
EntityData getEntityData()
boolean tryToOwn(Wand wand)
boolean isReflected(double angle)
boolean isBlocked(double angle)
int getLastHeldMapId()
@Nonnull Collection<MageClass> getClasses()
@Nonnull Collection<String> getClassKeys()
void damagedBy(@Nonnull org.bukkit.entity.Entity enity, double damage)
@Nullable Collection<org.bukkit.entity.Entity> getDamagers()
@Nullable org.bukkit.entity.Entity getLastDamager()
@Nullable org.bukkit.entity.Entity getTopDamager()
@Nullable org.bukkit.entity.Entity getLastDamageTarget()
@Nullable org.bukkit.block.Block getLastBlockBroken()
void setTarget(org.bukkit.entity.Entity entity)
@Nonnull CasterProperties getActiveProperties()
If the mage has no active class, then mage properties are returned.
double getVaultBalance()
boolean addVaultCurrency(double delta)
boolean removeVaultCurrency(double delta)
boolean hasTag(String tag)
void addTag(String tag)
boolean setActiveClass(@Nullable String key)
key - The key of the class to set, may be null to clear it.@Nonnull CasterProperties getProperties()
double getVehicleMovementDirection()
double getVehicleStrafeDirection()
boolean isVehicleJumping()
org.bukkit.util.Vector getVelocity()
This is a computed value, and is not the same as getEntity().getVelocity.
double getLastFallDistance()
void setVanished(boolean vanished)
boolean isVanished()
void setGlidingAllowed(boolean allow)
boolean isGlidingAllowed()
@Nullable @Deprecated Wand getSoulWand()
Get the Mage's "soul" wand. This represents all of the spells and other properties that are bound to the Mage itself, rather than to a specific wand.
This wand never appears as an in-game item.
boolean isAutomaton()
void attributesUpdated()
This will force a rebuild of spell parameters that may appear in lore, so that the lore will correctly reflect the new attribute values.
This is called automatically if using setAttribute, and so should only be called if updating attributes via an external AttributeProvider.
void setLastDamageType(String damageType)
Set this prior to damaging a mage for custom weakness/protection to work properly.
damageType - A damage type as defined in config.yml@Nullable String getLastDamageType()
This can be a custom damage type, or the name of a vanilla type.
void setLastDamageDealtType(String damageType)
double getLastDamage()
double getLastDamageDealt()
double getLastBowPull()
org.bukkit.entity.EntityType getLastProjectileType()
@Nonnull MageContext getContext()
long getCreatedTime()
boolean trigger(String trigger)
double getEarnMultiplier(String currency)
@Deprecated float getEarnMultiplier()
@Deprecated float getSPMultiplier()
void deactivateClasses()
void activateClasses()
void deactivateModifiers()
void activateModifiers()
void setLaunchingProjectile(boolean launching)
Always make sure to unset it.
boolean isLaunchingProjectile()
double getHealth()
double getMaxHealth()
boolean toggleSpellEnabled(String spellKey)
@Nonnull org.bukkit.configuration.ConfigurationSection getVariables()
void updatePassiveEffects()
boolean addModifier(@Nonnull String key, @Nullable org.bukkit.configuration.ConfigurationSection properties)
boolean addModifier(@Nonnull String key, int duration, @Nullable org.bukkit.configuration.ConfigurationSection properties)
MageModifier removeModifier(@Nonnull String key)
@Nullable MageModifier getModifier(String key)
boolean isBypassEnabled()
void setBypassEnabled(boolean enable)
@Nullable List<CastParameter> getOverrides(String spellKey)
boolean isResourcePackEnabled()
boolean hasResourcePack()
boolean isUrlIconsEnabled()
boolean canUse(org.bukkit.inventory.ItemStack item)
boolean canCraft(String recipeKey)
@Deprecated String parameterize(String command, String prefix)
@Deprecated String parameterizeMessage(String command)
ClientPlatform getClientPlatform()
@Nullable CasterProperties getCasterProperties(String propertyType)
boolean allowContainerCopy()
Copyright © 2021 elMakers. All rights reserved.