public interface Wand extends CostReducer, CooldownReducer, CasterProperties
Every Wand has an inventory of Spell keys and Material brush keys that it may cast and use.
A Wand may also have a variety of properties, including effects, an XP ("Mana") pool for casting Spells with an XP-based CastingCost, and various boosts and protections.
Each Wand is backed by an ItemStack, and the Wand stores its data in the ItemStack. A Wand is otherwise not tracked or persistent, other than via the Mage.getActiveWand() method, or via a tracked LostWand record, if the ItemStack can be found.
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Mage mage)
Deprecated.
|
boolean |
add(Wand other,
Mage mage)
Deprecated.
|
boolean |
addBrush(String key) |
boolean |
addEnchantments(Map<org.bukkit.enchantments.Enchantment,Integer> enchants) |
boolean |
addItem(org.bukkit.inventory.ItemStack item) |
boolean |
addSpell(String key) |
boolean |
alphabetizeInventory() |
void |
bind() |
boolean |
canProgress()
See if this wand can progress.
|
boolean |
canUse(org.bukkit.entity.Player player) |
boolean |
cast() |
boolean |
cast(Spell spell) |
boolean |
cast(String[] parameters) |
boolean |
checkUpgrade(boolean quiet)
See if this wand is ready for an upgrade.
|
void |
closeInventory() |
boolean |
configure(Map<String,Object> properties)
Deprecated.
|
void |
cycleHotbar() |
void |
damageDealt(double damage,
org.bukkit.entity.Entity target)
Deprecated.
|
void |
deactivate() |
void |
describe(org.bukkit.command.CommandSender sender)
Print all properties to a CommandSender in a human-readable format.
|
Wand |
duplicate() |
int |
enchant(int levels) |
int |
enchant(int levels,
Mage mage) |
int |
enchant(int levels,
Mage mage,
boolean addSpells) |
boolean |
fill(org.bukkit.entity.Player player) |
boolean |
fill(org.bukkit.entity.Player player,
int maxLevel) |
String |
getActiveBrushKey() |
Spell |
getActiveSpell() |
String |
getActiveSpellKey() |
SpellTemplate |
getBaseSpell(String spellKey) |
Collection<String> |
getBrushes() |
Map<String,Integer> |
getBrushInventory() |
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
|
int |
getCurrentHotbar() |
WandAction |
getDropAction() |
org.bukkit.Color |
getEffectColor() |
String |
getEffectParticleName() |
Map<org.bukkit.enchantments.Enchantment,Integer> |
getEnchantments() |
float |
getHealthRegeneration() |
int |
getHeldSlot() |
float |
getHungerRegeneration() |
MaterialAndData |
getIcon() |
String |
getId() |
MaterialAndData |
getInactiveIcon() |
org.bukkit.inventory.ItemStack |
getItem() |
WandAction |
getLeftClickAction() |
org.bukkit.Location |
getLocation() |
Mage |
getMage() |
MageClass |
getMageClass() |
String |
getMageClassKey() |
float |
getMana() |
int |
getManaMax() |
int |
getManaRegeneration() |
String |
getName() |
Map<String,String> |
getOverrides() |
WandUpgradePath |
getPath() |
float |
getPower() |
WandAction |
getRightClickAction() |
Spell |
getSpell(String key)
Returns a Spell for a given spell key, if this caster has the spell.
|
Spell |
getSpell(String key,
Mage mage) |
Map<String,Integer> |
getSpellInventory() |
Collection<String> |
getSpells() |
SpellTemplate |
getSpellTemplate(String key)
Returns the SpellTemplate representing the requested spell key at the correct level.
|
WandAction |
getSwapAction() |
WandTemplate |
getTemplate() |
String |
getTemplateKey() |
long |
getWorth() |
boolean |
hasBrush(String key) |
boolean |
hasInventory() |
boolean |
hasSlot(String slot) |
boolean |
hasSpell(SpellKey spellKey) |
boolean |
hasSpell(String key) |
boolean |
hasTag(String tag) |
boolean |
hasUpgrade()
Check to see if this wand has an upgrade on its current path
|
boolean |
isBlocked(double angle)
Deprecated.
|
boolean |
isBound() |
boolean |
isConsumeFree() |
boolean |
isCooldownFree()
Check if cooldowns should be bypassed completely.
|
boolean |
isCostFree() |
boolean |
isEnchantable() |
boolean |
isIndestructible() |
boolean |
isInOffhand() |
boolean |
isInventoryOpen() |
boolean |
isLocked() |
boolean |
isLost(LostWand wand) |
boolean |
isModifiable() |
boolean |
isQuickCast() |
boolean |
isQuickCastDisabled() |
boolean |
isReflected(double angle)
Deprecated.
|
boolean |
isSoul()
Deprecated.
|
boolean |
isSuperPowered() |
boolean |
isSuperProtected() |
boolean |
isUndroppable() |
LostWand |
makeLost(org.bukkit.Location location) |
void |
makeModifiable() |
void |
makeUpgrade() |
boolean |
organizeInventory() |
boolean |
organizeInventory(Mage mage) |
String |
parameterize(String command) |
boolean |
performAction(WandAction action) |
boolean |
playEffects(String key) |
boolean |
removeBrush(String key) |
void |
removeMana(float mana) |
void |
removeOverride(String key) |
boolean |
removeProperty(String key)
Remove a property from this store.
|
boolean |
removeSpell(String key) |
void |
save(org.bukkit.configuration.ConfigurationSection section,
boolean filtered)
Save this Wand to a Configuration Section.
|
void |
saveState()
Save current Wand state to the ItemStack's NBT data immediately.
|
void |
setActiveBrush(String key) |
void |
setActiveSpell(String key) |
void |
setCurrentHotbar(int hotbar) |
void |
setDescription(String description) |
void |
setEnchantments(Map<org.bukkit.enchantments.Enchantment,Integer> enchants) |
void |
setHeldSlot(int slot) |
void |
setIcon(MaterialAndData icon) |
void |
setInactiveIcon(MaterialAndData icon) |
void |
setMana(float mana) |
void |
setManaMax(int manaMax)
Deprecated.
|
void |
setName(String name) |
void |
setOverride(String key,
String value) |
void |
setOverrides(Map<String,String> overrides) |
boolean |
showCastMessages() |
void |
showInstructions() |
boolean |
showMessages() |
void |
unbind() |
void |
unenchant() |
void |
unlock()
Deprecated.
|
void |
updateBrushInventory(Map<String,Integer> updateBrushes) |
void |
updateMana() |
void |
updateSpellInventory(Map<String,Integer> updateSpells) |
boolean |
upgrade(boolean quiet)
Trigger an upgrade to the next path.
|
boolean |
upgrade(Map<String,Object> properties)
Deprecated.
|
getConsumeReduction, getCostScaleadd, checkAndUpgrade, forceAddSpell, getAttribute, getEffectiveManaMax, getEffectiveManaRegeneration, getLevel, getMaxSpells, getSpellLevel, randomize, sendMessageKey, setAttribute, setManaMax, setManaRegeneration, setManaRegeneration, setPath, setSpellLevel, setSpelLLevel, upgradesAllowedconfigure, configure, getStorage, upgrade, upgradedescribe, getBoolean, getBoolean, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getProperty, getProperty, getProperty, getSectionList, getString, getString, getStringList, hasProperty, isEmptyString getName()
String getId()
long getWorth()
void closeInventory()
void deactivate()
boolean organizeInventory(Mage mage)
boolean organizeInventory()
boolean alphabetizeInventory()
@Nullable org.bukkit.inventory.ItemStack getItem()
MaterialAndData getIcon()
MaterialAndData getInactiveIcon()
void setIcon(MaterialAndData icon)
void setInactiveIcon(MaterialAndData icon)
void makeUpgrade()
Collection<String> getSpells()
getSpells in interface CasterPropertiesCollection<String> getBrushes()
getBrushes in interface CasterPropertiesvoid describe(org.bukkit.command.CommandSender sender)
MagicPropertiesdescribe in interface MagicPropertiessender - Where to print properties.void unenchant()
@Deprecated void unlock()
void makeModifiable()
Wand duplicate()
Spell getSpell(String key)
CasterPropertiesWill return the correct spell level for the given spell, regardless of the level requested.
getSpell in interface CasterPropertieskey - The spell key to request@Nullable SpellTemplate getSpellTemplate(String key)
CasterPropertiesgetSpellTemplate in interface CasterPropertieskey - The key of the spell being requestedboolean hasSpell(String key)
hasSpell in interface CasterPropertiesboolean hasSpell(SpellKey spellKey)
boolean hasBrush(String key)
hasBrush in interface CasterPropertiesboolean isModifiable()
boolean isLocked()
boolean canUse(org.bukkit.entity.Player player)
boolean fill(org.bukkit.entity.Player player)
boolean fill(org.bukkit.entity.Player player,
int maxLevel)
@Deprecated boolean add(Wand other, Mage mage)
boolean addItem(org.bukkit.inventory.ItemStack item)
addItem in interface CasterPropertiesboolean removeProperty(String key)
MagicConfigurableIf this property is inherited, it cannot be removed. If this property exists but an inherited value also exists, the property will now have the inherited value.
removeProperty in interface MagicConfigurablekey - The key to removeboolean addBrush(String key)
addBrush in interface CasterPropertiesboolean addSpell(String key)
addSpell in interface CasterPropertiesboolean removeBrush(String key)
boolean removeSpell(String key)
String getActiveBrushKey()
String getActiveSpellKey()
void setActiveBrush(String key)
void setActiveSpell(String key)
void setName(String name)
void setDescription(String description)
LostWand makeLost(org.bukkit.Location location)
boolean isLost(LostWand wand)
int enchant(int levels)
int enchant(int levels,
Mage mage)
int enchant(int levels,
Mage mage,
boolean addSpells)
void removeOverride(String key)
SpellTemplate getBaseSpell(String spellKey)
boolean isSuperProtected()
boolean isSuperPowered()
boolean isCostFree()
isCostFree in interface CasterPropertiesisCostFree in interface CostReducerboolean isConsumeFree()
isConsumeFree in interface CasterPropertiesisConsumeFree in interface CostReducerboolean isCooldownFree()
CooldownReducerisCooldownFree in interface CasterPropertiesisCooldownFree in interface CooldownReducerfloat getPower()
float getHealthRegeneration()
float getHungerRegeneration()
float getCooldownReduction()
CooldownReducergetCooldownReduction in interface CooldownReducerfloat getCostReduction()
CostReducergetCostReduction in interface CostReducervoid removeMana(float mana)
removeMana in interface CasterPropertiesfloat getMana()
getMana in interface CasterPropertiesint getManaMax()
getManaMax in interface CasterPropertiesvoid setMana(float mana)
setMana in interface CasterProperties@Deprecated void setManaMax(int manaMax)
setManaMax in interface CasterPropertiesint getManaRegeneration()
getManaRegeneration in interface CasterPropertiesvoid updateMana()
WandUpgradePath getPath()
getPath in interface CasterPropertiesMageController getController()
getController in interface CasterPropertiesboolean showCastMessages()
boolean showMessages()
@Nullable WandTemplate getTemplate()
boolean isIndestructible()
boolean playEffects(String key)
boolean cast()
boolean cast(String[] parameters)
boolean cast(Spell spell)
boolean isBound()
boolean isUndroppable()
boolean isQuickCastDisabled()
boolean isInventoryOpen()
boolean isQuickCast()
void cycleHotbar()
void setCurrentHotbar(int hotbar)
int getCurrentHotbar()
boolean hasTag(String tag)
boolean hasSlot(String slot)
void bind()
void unbind()
void save(org.bukkit.configuration.ConfigurationSection section,
boolean filtered)
section - The section to save to.filtered - If true, removes item-specific data such as Wand
id and bound owner.void saveState()
Wands are saved periodically so this is generally not needed unless you need to force an update right away.
boolean checkUpgrade(boolean quiet)
quiet - if false, will send messages to a player informing them why they are blockedboolean hasUpgrade()
boolean canProgress()
canProgress in interface CasterPropertiesboolean upgrade(boolean quiet)
quiet - if false, will send messages to the player about their upgrade@Deprecated boolean upgrade(Map<String,Object> properties)
Use MagicConfigurable.upgrade(ConfigurationSection) instead.
@Deprecated void activate(Mage mage)
Mage.checkWand() instead.
Wands should only ever be active while held.@Nullable org.bukkit.Color getEffectColor()
getEffectColor in interface CasterPropertiesString getEffectParticleName()
getEffectParticleName in interface CasterProperties@Nullable org.bukkit.Location getLocation()
Mage getMage()
getMage in interface CasterPropertiesboolean hasInventory()
int getHeldSlot()
void setHeldSlot(int slot)
boolean isInOffhand()
@Deprecated boolean configure(Map<String,Object> properties)
Use MagicConfigurable.configure(ConfigurationSection) instead.
@Deprecated boolean isSoul()
WandAction getDropAction()
WandAction getRightClickAction()
WandAction getLeftClickAction()
WandAction getSwapAction()
boolean performAction(WandAction action)
@Nonnull MageContext getContext()
boolean isEnchantable()
void showInstructions()
@Deprecated void damageDealt(double damage, org.bukkit.entity.Entity target)
@Deprecated boolean isReflected(double angle)
@Deprecated boolean isBlocked(double angle)
Copyright © 2021 elMakers. All rights reserved.