NOTE: This a custom enchant module require TokenEnchant plugin. 

This plugin contains a custom enchantment effect to create Squirt1e's WaterGun, which will give damage to nearby entities.

If you just left-click with an item with Squirt1eWaterGun, it will generate the Squirt1eWaterGun in the mid-air.  If you aim at a living entity, it will first try to find a target player and generate the Squirt1eWaterGun above this player.

Installation:
Just install TE-Squirt1eWaterGunEnchant.jar in TokenEnchant/enchants folder. Then you can either "restart the server" or "reload the plugin (not /te reload)". Squirt1eWaterGunEnchantment will automatically be loaded into TokenEnchant framework.

Configuration:
You need to add new entry for "Squirt1eWaterGun" enchant in your config.yml.

    Squirt1eWaterGun:
      event_map:
        PlayerInteractEvent: "HIGHEST"
        EntityDamageByEntityEvent: "HIGHEST"
      alias: Squirt1e
      price: 10
      max: 4
      # search target within the distance of level * distance_multiplier
      distance_multiplier: 5
      # search distance will be capped at this
      max_distance: 100
      # thunder gives level * damage_multiplier damage to an entity
      damage_multiplier: 3
      # probability to control the behavior of thunder
      probability: 0.02
      # iteration
      iteration: 200
      # maximum branching of thunder
      max_branch: 4
      sound: ENTITY_GENERIC_SPLASH  # for pre 1.9 -> SPLASH
      cooldown: 3
      cooldown_message: "&a[TE] You have to wait for &b%remaining% &aseconds."
      occurrence: always