Class EnchantHandler

java.lang.Object
com.vk2gpz.tokenenchant.api.EnchantHandler
All Implemented Interfaces:
com.vk2gpz.mc.api.enchantment.ICEHandler, com.vk2gpz.mc.event.EventMapper, CEHandler, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.event.Listener
Direct Known Subclasses:
PotionHandler

public abstract class EnchantHandler extends Object implements org.bukkit.command.TabExecutor, CEHandler, com.vk2gpz.mc.event.EventMapper
EnchantHandler is used to implement a custom enchant which will be registered with Minecraft's Enchantment system.

If you create your custom enchantment class by extending this class, TokenEnchant will automatically create and register an appropriate Enchantment class.

  • Field Details

    • DEFAULT

      protected static final String DEFAULT
      See Also:
    • KEY

      protected String KEY
    • te

      protected ITokenEnchant te
      Represents actual TokenEnchat plugin.
    • plugin

      protected org.bukkit.plugin.Plugin plugin
    • enabled

      protected boolean enabled
    • cooldowns

      protected HashMap<UUID,Long> cooldowns
      cooldown related
    • cooldown

      protected int cooldown
    • cooldownMsg

      protected String cooldownMsg
    • allowedItems

      protected Set<String> allowedItems
    • supportedItems

      protected Set<org.bukkit.Material> supportedItems
    • conflicts

      protected Set<String> conflicts
    • eventPriorityMap

      protected Map<String,org.bukkit.event.EventPriority> eventPriorityMap
    • config

      protected org.bukkit.configuration.file.FileConfiguration config
    • permNode

      protected String permNode
    • permMode

      protected CEHandler.PermissionMode permMode
    • enchantChance

      protected double enchantChance
    • description

      protected String description
    • showDescription

      protected boolean showDescription
    • mergeMode

      protected CEHandler.MergeMode mergeMode
    • mergeMax

      protected int mergeMax
    • etMax

      protected int etMax
    • max

      protected int max
    • interval

      protected int interval
    • base

      protected int base
    • price

      protected double price
    • invalidInWorld

      protected List<String> invalidInWorld
    • enabledWorld

      protected List<String> enabledWorld
    • invalidInRegion

      protected List<String> invalidInRegion
    • enabledRegion

      protected List<String> enabledRegion
    • occurrence

      protected double occurrence
    • occurrence_min

      protected double occurrence_min
    • alias

      protected String alias
    • refundRate

      protected double refundRate
    • duration

      protected int duration
    • duration_multiplier

      protected int duration_multiplier
    • costFormula

      protected String costFormula
    • costParams

      protected double[] costParams
    • cooldownFormula

      protected String cooldownFormula
    • occurrenceFormula

      protected String occurrenceFormula
    • rarity

      protected com.vk2gpz.mc.enchantment.Rarity rarity
    • availabilities

      protected Set<CEHandler.Availability> availabilities
    • enchantmentSlotType

      protected com.vk2gpz.mc.api.enchantment.EnchantmentSlotType enchantmentSlotType
    • enumItemSlots

      protected com.vk2gpz.mc.api.enchantment.EnumItemSlot[] enumItemSlots
    • applyOffHand

      protected boolean applyOffHand
    • useActionBar

      protected boolean useActionBar
    • name

      protected String name
    • hidden

      protected boolean hidden
    • forceCMD

      protected boolean forceCMD
    • useRomanNumeral

      protected boolean useRomanNumeral
    • enchantment

      protected org.bukkit.enchantments.Enchantment enchantment
    • enchantTarget

      protected org.bukkit.enchantments.EnchantmentTarget enchantTarget
    • potionEffectType

      protected org.bukkit.potion.PotionEffectType potionEffectType
    • cmd_map

      protected Map<org.bukkit.Material,Integer> cmd_map
    • effectSound

      protected org.bukkit.Sound effectSound
    • effectSoundVolume

      protected float effectSoundVolume
    • effectSoundPitch

      protected float effectSoundPitch
    • playEffectSoundPlayerOnly

      protected boolean playEffectSoundPlayerOnly
    • castingSound

      protected org.bukkit.Sound castingSound
    • castingSoundVolume

      protected float castingSoundVolume
    • castingSoundPitch

      protected float castingSoundPitch
    • ceCommands

      protected Map<Integer,List<CEHandler.CECommand>> ceCommands
    • COMMON_CMD_LEVEL

      protected final int COMMON_CMD_LEVEL
      See Also:
    • fullArmor

      protected boolean fullArmor
  • Constructor Details

  • Method Details

    • getKey

      public String getKey()
      Specified by:
      getKey in interface CEHandler
    • getPlugin

      public org.bukkit.plugin.Plugin getPlugin()
      Specified by:
      getPlugin in interface CEHandler
    • getTE

      public ITokenEnchant getTE()
      Specified by:
      getTE in interface CEHandler
    • setUseRomanNumeral

      public void setUseRomanNumeral(boolean use)
    • useRomanNumeral

      public boolean useRomanNumeral()
      Specified by:
      useRomanNumeral in interface CEHandler
    • setName

      public void setName(String name)
    • getName

      public String getName()
      Description copied from interface: CEHandler
      Returns the name of this custom enchantment/potion.
      Specified by:
      getName in interface CEHandler
      Specified by:
      getName in interface com.vk2gpz.mc.api.enchantment.ICEHandler
      Returns:
      the name of this custom enchantment/potion.
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in interface CEHandler
    • getEnchantment

      public org.bukkit.enchantments.Enchantment getEnchantment()
      Specified by:
      getEnchantment in interface com.vk2gpz.mc.api.enchantment.ICEHandler
    • setEnchantment

      public void setEnchantment(org.bukkit.enchantments.Enchantment enchantment)
      Specified by:
      setEnchantment in interface com.vk2gpz.mc.api.enchantment.ICEHandler
    • getPotionEffectType

      public org.bukkit.potion.PotionEffectType getPotionEffectType()
      Specified by:
      getPotionEffectType in interface CEHandler
    • setPotionEffectType

      public void setPotionEffectType(org.bukkit.potion.PotionEffectType potionEffectType)
      Specified by:
      setPotionEffectType in interface CEHandler
    • setConfig

      protected void setConfig()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isRegistered

      public boolean isRegistered()
      Specified by:
      isRegistered in interface CEHandler
    • getConfig

      public org.bukkit.configuration.file.FileConfiguration getConfig()
      Specified by:
      getConfig in interface CEHandler
    • requiredTokenEnchantVersion

      protected String requiredTokenEnchantVersion()
      This method returns the version string of the required TokenEnchant plugin.
      Returns:
      the version string of the required TokenEnchant plugin. ('*' represents any version)
    • getVersion

      public String getVersion()
      Returns the version of this custom enchantment
      Specified by:
      getVersion in interface CEHandler
      Returns:
      the version of this custom enchantment
    • getAllowed

      @Deprecated protected org.bukkit.ChatColor getAllowed(org.bukkit.entity.Player p, String perm)
      Deprecated.
      A utility method to return a chat color based on whether the specified player has the specified permission or not.
      Parameters:
      p - a plaer to be checked.
      perm - a permission node to be checked.
      Returns:
      ChatColor.AQUA if the player has the permission, ChatColor.GRAY otherwise.
    • getAllowed

      protected org.bukkit.ChatColor getAllowed(org.bukkit.entity.Player p)
      A utility method to return a chat color based on whether the specified player has the permission or not.
      Parameters:
      p - a plaer to be checked.
      Returns:
      ChatColor.AQUA if the player has the permission, ChatColor.GRAY otherwise.
    • onCommand

      public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull String label, String[] args)
      if your custom enchantment provides any special command, you can write your command process here. The command will be "/te yourcommand arguments..."

      If your enchant actually responds to this method call, you should return "true" If your enchant does not need to respond to onCommand, you should not override this, or simply return false.

      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
    • onTabComplete

      public List<String> onTabComplete(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command cmd, @NotNull @NotNull String label, String[] args)
      if your custom enchantment provides any special command, you can write your tab completion process here. The command will be "/te yourcommand arguments..."
      Specified by:
      onTabComplete in interface org.bukkit.command.TabCompleter
    • doHelp

      public void doHelp(org.bukkit.command.CommandSender sender)
      If this custom enchantment/potion has a command, you can provide its help description in this method. This method will automatically be called from TokenEnchant and the help will be included in TokenEnchant's /te help menu.
       
       if (isAllowed(sender, "myenchant.mycommand"))
       sender.sendMessage("- " + getAllowed(sender, "myenchant.mycommandd") + "/tokenenchant mycommand arguments : mycommand does xxxxx.");
       
       
      Parameters:
      sender - CommandSender object which issued the /te help command
    • applyState

      public CEHandler applyState(org.bukkit.entity.Player player, int duration, int amplifier)
      Description copied from interface: CEHandler
      If the custom enchantment/potion behave like a regular potion effect, you should describe what sort of effect to be applied to a player in this method. This method will automatically be called when a player hold an item with this enchantment.
      Specified by:
      applyState in interface CEHandler
      Parameters:
      player - A player whom this potion will be applied to
      duration - A duration of this potion effect being applied to
      amplifier - An amplifier of this potion effect being applied to
      Returns:
      this CEHandler, if this CEHandler did apply a PotionEffectType.
    • canApply

      public boolean canApply(org.bukkit.entity.Player player)
      Specified by:
      canApply in interface CEHandler
    • remove

      public void remove(org.bukkit.entity.Player player)
      If the custom enchantment/potion behave like a regular potion effect, you should describe how the custom potion effects should be disabled in this method. This method will automatically be called when a player no longer hold an item with this enchantment.
      Specified by:
      remove in interface CEHandler
      Parameters:
      player - A player whom this potion will be applied to
    • removeState

      public boolean removeState(org.bukkit.entity.Player player, int level)
      Specified by:
      removeState in interface CEHandler
    • loadConfig

      public void loadConfig()
      If the custom enchantment/potion needs to load any configuration informaiton from config.yml, config loading process should be written in this method.

      This method will automatically be called when TokenEnchant plugin is loaded.
      Specified by:
      loadConfig in interface CEHandler
    • cleanup

      public void cleanup()
      If the custom enchantment/potion needs to carry out any data clearning up upon unloading, you should do so in here after invoking super.cleanup()
      This method will automatically be called when TokenEnchant plugin is disabled/reloaded.
      Specified by:
      cleanup in interface CEHandler
    • getItemTarget

      public org.bukkit.enchantments.EnchantmentTarget getItemTarget()
      Specified by:
      getItemTarget in interface CEHandler
    • conflictsWith

      public boolean conflictsWith(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment)
      Specified by:
      conflictsWith in interface CEHandler
      Specified by:
      conflictsWith in interface com.vk2gpz.mc.api.enchantment.ICEHandler
    • conflictsWith

      public boolean conflictsWith(CEHandler cdh)
      Specified by:
      conflictsWith in interface CEHandler
    • getAlias

      public String getAlias()
      Reads the alias name of this custom enchantment from config.yml if it's specified under "alias:", null otherwise.
      Specified by:
      getAlias in interface CEHandler
      Returns:
      the alias name of this custom enchantment from config.yml if it's specified under "alias:", null otherwise.
    • getOldAliases

      public List<String> getOldAliases()
      Specified by:
      getOldAliases in interface CEHandler
    • isOldAlias

      public boolean isOldAlias(String oldAlias)
    • getDurationMultiplier

      public int getDurationMultiplier()
      Description copied from interface: CEHandler
      This method returns the duration multiplier of a potion effect if any.
      Specified by:
      getDurationMultiplier in interface CEHandler
      Returns:
      the duration multiplier of a potion effect if any.
    • getDuration

      public int getDuration()
      Returns the duration of this potion effect.
      Specified by:
      getDuration in interface CEHandler
      Returns:
      the duration of this potion effect.
    • isValid

      public boolean isValid(org.bukkit.Location location)
      Returns true if the specified player is allowed to use the specified enchantment at the specified location. This method checks "world" names where the enchantment is allowed or not.
      Specified by:
      isValid in interface CEHandler
      Parameters:
      location - the location where this enchant is used.
      Returns:
      true if the specified player is allowed to use the specified enchantment at the specified location.
    • isValid

      @Deprecated public boolean isValid(String name, org.bukkit.Location location)
      Deprecated.
    • getPermissionNode

      public String getPermissionNode()
      Given a common/alias name or official name of an enchantment, it returns the permission node of the specified PotionEffectType object.
      Specified by:
      getPermissionNode in interface CEHandler
      Returns:
      the permission node.
    • getPermissionNode

      @Deprecated public String getPermissionNode(String enchantname)
      Deprecated.
    • getPermissionMode

      public CEHandler.PermissionMode getPermissionMode()
      The use of permission node. ENCHANT : a user with a permission can enchant and use an item. USE : a user with a permission can use the enchant but not apply the enchant..
      Specified by:
      getPermissionMode in interface CEHandler
      Returns:
      the permission mode.
    • getEnchantChance

      public double getEnchantChance()
      It returns the enchantment chance for this effect.
      Specified by:
      getEnchantChance in interface CEHandler
      Returns:
      the enchantment chance.
    • showDescription

      public boolean showDescription()
      Specified by:
      showDescription in interface CEHandler
    • getDescription

      public String getDescription()
      It returns the description of this effect.
      Specified by:
      getDescription in interface CEHandler
      Returns:
      the description.
    • getMergeMode

      public CEHandler.MergeMode getMergeMode()
      It returns the merge mode.
      Specified by:
      getMergeMode in interface CEHandler
      Returns:
      the merge node.
    • getMaxLevel

      public int getMaxLevel()
      It returns the max enchant level.
      Specified by:
      getMaxLevel in interface CEHandler
      Specified by:
      getMaxLevel in interface com.vk2gpz.mc.api.enchantment.ICEHandler
      Returns:
      the max enchant level.
    • setMaxLevel

      public void setMaxLevel(int max)
      Sets the max enchantment level. It also automatically computes its scale.
      Parameters:
      max - the max enchant level.
    • getScale

      public int getScale()
      /** It returns the scale of the encahntment level.
      Specified by:
      getScale in interface CEHandler
      Returns:
      the scale of the encahntment level.
    • getMergeMax

      public int getMergeMax()
      It returns the max merged enchant level.
      Specified by:
      getMergeMax in interface CEHandler
      Returns:
      the max merged enchant level.
    • getETMax

      public int getETMax()
      It returns the max enchant level for using the Enchantment Table.
      Specified by:
      getETMax in interface CEHandler
      Returns:
      the max enchantment table enchant level.
    • getInterval

      public int getInterval()
      It returns the interval of effect increase.
      Specified by:
      getInterval in interface CEHandler
      Returns:
      the interval value.
    • getBase

      public int getBase()
      It returns the base enchant level.
      Specified by:
      getBase in interface CEHandler
      Returns:
      the interval value.
    • getPrice

      public double getPrice()
      It returns the base price.
      Specified by:
      getPrice in interface CEHandler
      Returns:
      the base price.
    • getCostFormula

      public String getCostFormula()
      It returns the id for cost function, which is defined in CostFormulae.js
      Specified by:
      getCostFormula in interface CEHandler
      Returns:
      the id for cost function, which is defined in CostFormulae.js
    • getCostParams

      public double[] getCostParams()
      Specified by:
      getCostParams in interface CEHandler
    • getOccurrenceFormula

      public String getOccurrenceFormula()
      It returns the id for a function, which is defined in OccurrenceFormulae.js
      Specified by:
      getOccurrenceFormula in interface CEHandler
      Returns:
      the id for a function, which is defined in OccurrenceFormulae.js
    • getCooldownFormula

      public String getCooldownFormula()
      It returns the id for a function, which is defined in OccurrenceFormulae.js
      Specified by:
      getCooldownFormula in interface CEHandler
      Returns:
      the id for a function, which is defined in OccurrenceFormulae.js
    • getRefundRate

      public double getRefundRate()
      It returns whether this enchant is refundable or nor
      Specified by:
      getRefundRate in interface CEHandler
      Returns:
      true if it is refundable
    • getCELevel

      public int getCELevel(org.bukkit.inventory.ItemStack item)
      If a player is holding an item with the effect represented by the specified CEHandler, it returns the level of this enchantment.
      Specified by:
      getCELevel in interface CEHandler
      Parameters:
      item - An ItemStack object the player has.
      Returns:
      return the level of enchantment.
    • getCELevel

      public int getCELevel(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack itemStack)
      It returns the level of this enchantment on the specified item. If a player has a permission node indicating the encant ment level, the returned level will be capped at that value.
      Specified by:
      getCELevel in interface CEHandler
      Parameters:
      p - Player whose item is examined for the specified enchant.
      itemStack - an item, to be examined.
      Returns:
      return the level of this enchantment on the item with palyer's permisison level.
    • getCELevel

      public int getCELevel(org.bukkit.entity.Player p)
      If a player is holding an item with the effect represented by the specified CEHandler, it returns the level of this enchantment.
      Specified by:
      getCELevel in interface CEHandler
      Parameters:
      p - Player whose item is examined for the specified enchant.
      Returns:
      return the level of this enchantment.
    • getCELevelOnArmor

      public int getCELevelOnArmor(org.bukkit.entity.Player p)
      If a player is wearing an item with the effect represented by the specified CEHandler, it returns the level of this enchantment.
      Specified by:
      getCELevelOnArmor in interface CEHandler
      Parameters:
      p - Player whose armor is examined for the specified enchant.
      Returns:
      return the level of this enchantment.
    • getCELevelOnAllArmor

      public int getCELevelOnAllArmor(org.bukkit.entity.Player p)
      If a player is wearing an item with the effect represented by the specified CEHandler, it returns the level of this enchantment.
      Specified by:
      getCELevelOnAllArmor in interface CEHandler
      Parameters:
      p - Player whose armor is examined for the specified enchant.
      Returns:
      return the level of this enchantment.
    • getOccurrence

      public double getOccurrence()
      It returns the chance of occurrence at the max level.
      Specified by:
      getOccurrence in interface CEHandler
      Returns:
      the occurrence at the max level.
    • getMinimumOccurrence

      public double getMinimumOccurrence()
      Description copied from interface: CEHandler
      It returns the minimum chance of occurrence.
      Specified by:
      getMinimumOccurrence in interface CEHandler
      Returns:
      the minimum occurrence.
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface CEHandler
    • getCooldown

      public int getCooldown()
      Description copied from interface: CEHandler
      It returns the maximum cooldown.
      Specified by:
      getCooldown in interface CEHandler
      Returns:
      the maximum cooldown.
    • resetCooldown

      public void resetCooldown(org.bukkit.entity.Player p)
      Specified by:
      resetCooldown in interface CEHandler
    • checkCooldown

      public boolean checkCooldown(org.bukkit.entity.Player p, int currentlevel)
      Specified by:
      checkCooldown in interface CEHandler
    • getSourceType

      protected org.bukkit.Material getSourceType(org.bukkit.entity.Projectile projectile)
    • addAllowed

      public void addAllowed(String allowed)
      This method will registerAddonClass the specified material to the list of allowable items for this CE;
      Specified by:
      addAllowed in interface CEHandler
      Parameters:
      allowed - allowed material name
    • removeAllowed

      public void removeAllowed(String allowed)
      This method will remove the specified material from the list of allowable items for this CE;
      Specified by:
      removeAllowed in interface CEHandler
      Parameters:
      allowed - allowed material name
    • canEnchantItem

      public boolean canEnchantItem(org.bukkit.inventory.ItemStack item)
      This method checks whether this CE can be applied to the specified item or not.
      Specified by:
      canEnchantItem in interface CEHandler
      Specified by:
      canEnchantItem in interface com.vk2gpz.mc.api.enchantment.ICEHandler
      Parameters:
      item - The item to be examined.
      Returns:
      true if this CE can be applied to thhe specified item
    • addConflict

      public void addConflict(String enchantName)
      This method will registerAddonClass the specified enchant name to the list of conflicting enchant of this CE;
      Specified by:
      addConflict in interface CEHandler
      Parameters:
      enchantName - enchant name to be registered
    • removeConflict

      public void removeConflict(String enchantName)
      This method will remove the specified enchant name from the list of conflict.
      Specified by:
      removeConflict in interface CEHandler
      Parameters:
      enchantName - enchant name to be removed.
    • hasConflictWith

      public boolean hasConflictWith(String enchantName)
      This method checks whether this CE conflicts with the specified enchant.
      Specified by:
      hasConflictWith in interface CEHandler
      Parameters:
      enchantName - The item to be examined.
      Returns:
      true if this CE conflicts with the specified enchant.
    • getConflicts

      public Set<String> getConflicts()
      Specified by:
      getConflicts in interface CEHandler
    • getEventPriorityMap

      public Map<String,org.bukkit.event.EventPriority> getEventPriorityMap()
      This method returns the pair of evnet name and its process priority for this CE.
      Specified by:
      getEventPriorityMap in interface com.vk2gpz.mc.event.EventMapper
      Returns:
      the pair of evnet name and its process priority for this CE.
    • set

      public Map<String,org.bukkit.event.EventPriority> set(String eventName, org.bukkit.event.EventPriority priority)
      Register event name and process priority pair.
      Specified by:
      set in interface com.vk2gpz.mc.event.EventMapper
      Parameters:
      eventName - the name of the event class (e.g. BlockBreakEvent.class.getSimpleName())
      Returns:
      the pair of evnet name and its process priority for this CE.
    • remove

      public Map<String,org.bukkit.event.EventPriority> remove(String eventName)
      Register event name and process priority pair.
      Specified by:
      remove in interface com.vk2gpz.mc.event.EventMapper
      Parameters:
      eventName - the name of the event class (e.g. BlockBreakEvent.class.getSimpleName())
      Returns:
      the pair of evnet name and its process priority for this CE.
    • getRarity

      public com.vk2gpz.mc.enchantment.Rarity getRarity()
      Specified by:
      getRarity in interface CEHandler
      Returns:
      the rarity of the enchantment
    • isAvailable

      public boolean isAvailable(CEHandler.Availability availability)
      Specified by:
      isAvailable in interface CEHandler
    • getEnchantmentSlotType

      public com.vk2gpz.mc.api.enchantment.EnchantmentSlotType getEnchantmentSlotType()
      Specified by:
      getEnchantmentSlotType in interface CEHandler
      Specified by:
      getEnchantmentSlotType in interface com.vk2gpz.mc.api.enchantment.ICEHandler
      Returns:
      the EnchantmentSlotType
    • getEnumItemSlots

      public com.vk2gpz.mc.api.enchantment.EnumItemSlot[] getEnumItemSlots()
      Specified by:
      getEnumItemSlots in interface CEHandler
      Returns:
      the array of EnumItemSlot
    • getLevel

      public int getLevel(String lore)
      Description copied from interface: CEHandler
      This method checks the given string and determine whehterh it starts its this enchant's name or alias, and returns the indicated level of enchantment.
      Specified by:
      getLevel in interface CEHandler
      Parameters:
      lore - a string which might start with this CE's name or alias.
      Returns:
      the level of enchant indicated in the specified string, otherwise -1 indicating no enchantment
    • useActionBar

      public boolean useActionBar()
      Description copied from interface: CEHandler
      This method returns true if this CE is to use the action bar for messaging.
      Specified by:
      useActionBar in interface CEHandler
      Returns:
      true if this CE is to use the action bar for messaging.
    • isThrownTool

      protected boolean isThrownTool(org.bukkit.entity.Entity entity)
    • getThrownItemStack

      protected org.bukkit.inventory.ItemStack getThrownItemStack(org.bukkit.entity.Entity entity)
    • getThrower

      protected org.bukkit.entity.Entity getThrower(org.bukkit.entity.Entity projectile)
    • forceCustomModelData

      public boolean forceCustomModelData()
      Specified by:
      forceCustomModelData in interface CEHandler
    • setForceCustomModelData

      public void setForceCustomModelData(boolean force)
      Specified by:
      setForceCustomModelData in interface CEHandler
    • getCustomModelData

      public int getCustomModelData(org.bukkit.Material material)
      Specified by:
      getCustomModelData in interface CEHandler
    • setCustomModelDataMap

      public void setCustomModelDataMap(Map<org.bukkit.Material,Integer> cmd_map)
      Specified by:
      setCustomModelDataMap in interface CEHandler
    • loadEffectSound

      protected void loadEffectSound()
    • getEffectSound

      public org.bukkit.Sound getEffectSound()
      Specified by:
      getEffectSound in interface CEHandler
    • getEffectSoundVolume

      public float getEffectSoundVolume()
      Specified by:
      getEffectSoundVolume in interface CEHandler
    • getEffectSoundPitch

      public float getEffectSoundPitch()
      Specified by:
      getEffectSoundPitch in interface CEHandler
    • playEffectSoundPlayerOnly

      public boolean playEffectSoundPlayerOnly()
      Specified by:
      playEffectSoundPlayerOnly in interface CEHandler
    • getCastingSound

      public org.bukkit.Sound getCastingSound()
      Specified by:
      getCastingSound in interface CEHandler
    • getCastingSoundVolume

      public float getCastingSoundVolume()
      Specified by:
      getCastingSoundVolume in interface CEHandler
    • getCastingSoundPitch

      public float getCastingSoundPitch()
      Specified by:
      getCastingSoundPitch in interface CEHandler
    • findTheLevelEntry

      protected int findTheLevelEntry(int lvl)
    • execCommands

      public boolean execCommands(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack item, int level, org.bukkit.Location loc, Object... somedata)
      Specified by:
      execCommands in interface CEHandler
    • papi

      protected static String papi(org.bukkit.entity.Player player, String text)
    • applyOffHand

      public boolean applyOffHand()
      Specified by:
      applyOffHand in interface CEHandler
    • requirFullArmor

      public boolean requirFullArmor()
      Specified by:
      requirFullArmor in interface CEHandler
    • getSupportedItems

      public Set<org.bukkit.Material> getSupportedItems()
      Specified by:
      getSupportedItems in interface com.vk2gpz.mc.api.enchantment.ICEHandler