HomeJavaModsFF: Aimed Hit [ 1.9 | 1.10. |1.11 ]
FF: Aimed Hit [ 1.9 | 1.10. |1.11 ]
Father’s Features: Aimed Hit
This was inspired by a denizen script.

Initially I created this plugin for my kids & friends on our white-listed server.
As I added more features, it become quite big and fun to use, so I decided to share it.

I am not counting on plugin development as an income source.
I do not plan to make this a premium resource.
Enjoy!

Please use this for Issues, help needed or requests.
I won’t be able to help you in the review section due to the 1-reply limitation & improper means to track every conversation.

Features

· Aimed Hits:

· Head, Body, Arms & Legs
· Damage adjuster
· Target & Attacker Customized Effects
· Target & Attacker Messages (Chat or Action bar)
· Commands & Sounds​

· PvP, PvE & EvP
:
· Make PvP and/or PvE more fun?
· Or … make EvP more fun and allow mobs to use the AimedHit system when attacking players!
· Additional damage adjusters for each of them (PvP, PvE, EvP) for extra granularity.
· Any of them can be enabled/disabled from config·
· NoHelmetGetsYouKilled: Enabled/Disabled for PvP or PVE
· Melee & Ranged:
· Can chose the type of damage that can benefit from AimedHits (Projectile, Entity_Attack .. or even falling damage)
· Can limit even more, by restricting the weapon used
· Any of them can be enabled/disabled from config
· All types of mobs:
· Enable or disable mobs as you see fit
· Change the hit-box setup for each of them if my defaults don’t fit your needs.
· …. Including custom made mobs (eg Mythic Mobs)
· See Limitations*
· Multiworld support.

· WordGuard and GriefPrevention support

· Permissions: You can limit the usage based on permissions

· Debug : Check the reason why a AimedHit did not trigger for that target and adjust the config.


Installation

· Copy AimedHit.jar
to your plugin folders
· Restart your server
· Enjoy!
· Optional:
Open the config file and adjust the settings based on your needs.


Permissions

aimedhit.use

· Allows a player to use AimedHit.
· This is disabled in the config. Enable it there if you want to make use of the permission restriction.​

aimedhit.admin

· Allows a player to use the aimedhit commands​


Commands


/ffah reload
· Reloads the config file without restarting the server
· Sets Debug to Off.

/ffah debug
· Shows extra information to the Attackers including the reason why the shot did not trigger AimedHit in that case (eg: no PVP in WorldGuard, distance too short for projectile, mob disabled in config )
· This is a “global” setting. If you enable it, it will show the extra information to the ALL the Attackers with the aimedhit.admin permission.


Setup/Configuration

See the config file below. Everything should be self-explanatory.
Please use this for Issues, help needed or requests.

Spoiler: Default Config File
Code (Text):
# AimedHit by TheDarthFather

# Need help ? Link below:
# https://github.com/TheDarthFather/AimedHit/issues

# ---------------------------------------------------------------------------------------------------------------------------------------------------
# VARIBLES
#  %Target
#  %Attacker
#  %BonusDamage
#  %TotalDamage
# ---------------------------------------------------------------------------------------------------------------------------------------------------

# ---------------------------------------------------------------------------------------------------------------------------------------------------
# RESOURCES
#  SOUNDS
#  - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
#  DAMAGE CAUSE
#  - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
#  ITEM NAMES
#  - http://www.minecraft-servers-list.org/id-list/
#  POTION EFFECT
#  - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
# ---------------------------------------------------------------------------------------------------------------------------------------------------


# < CONFIG ------------------------------------------------------------------------------------------------------------------------------------------

# PerWorld activation -------------------------------------------------------------------------------------------------------------------------------
# - False -> active for all the worlds
# - True  -> active for listed worlds

MultiWorld:
  UsePerWorlds: false
  Worlds:
   - world
   - AnotherWorld

# General setup -------------------------------------------------------------------------------------------------------------------------------------

General:

  # EnablePlayerVsPlayer: true
  # AimedHit applies when a Player hits another Player (PvP). Default: true
  EnablePlayerVsPlayer: true

  # EnablePlayerVsMob: true
  # AimedHit applies when a Player hits a Mob (PvE). Default: true
  EnablePlayerVsMob: true

  # EnableMobsVsPlayer: true
  # AimedHit applies when a Mob hits a Player (EvP). Default: true
  EnableMobsVsPlayer: true

  # EnabledDamageCause: PROJECTILE, ENTITY_ATTACK
  # AimedHit applies when the cause of the attack is listed as specified. Default PROJECTILE (eg arrows, snow_balls), ENTITY_ATTACK (Melee)
  # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
  EnabledDamageCause: PROJECTILE, ENTITY_ATTACK

  # ProjectileMinDistance: 5
  # Limits the distance AimedHit works for projectiles. Default 5.
  ProjectileMinDistance: 5

  # EnableAllowedWeaponList: false
  # If true: The effects will apply only if the Attacker is using one of the Weapons/Items below (Allowed Weapons). Default: false
  EnableAllowedWeaponList: false

  # AllowedWeapons: BOW,SNOW_BALL,IRON_SWORD,DIAMOND_SWORD
  # Add/Delete Minecraft Item names in the list to limit the weapons that can be used
  # http://www.minecraft-servers-list.org/id-list/
  AllowedWeapons: BOW,SNOW_BALL,IRON_SWORD,DIAMOND_SWORD

  # NoHelmetGetsYouKilled: false
  # If True: If the target doesn't have a helmet one head-shot will kill it. Default: false
  NoHelmetGetsYouKilled: false

  # NoHelmetRuleAppliesForMobs: false
  # If True: Applies the above "NoHelmet rule" when a player hits a Mobs .... !!! True will make Headshots OP in PvE. Default: false
  NoHelmetRuleAppliesForMobs: false

  # UsePermissions: false
  # If True: AimedHit will work only for the players with aimedhit.use permission. Default: false
  UsePermissions: false

  # ActionBarMessage: true
  # If false, the players will receive the messages in chat.
  ActionBarMessage: true

# Effect Setup --------------------------------------------------------------------------------------------------------------------------------------
#  - Damage is given as % to the base damage (eg 1.2 means 120%)
#  - TargetEffect / AttackerEffect: %Probability, Effect, Duration, Level
#     EFFECTS: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
#  - TargetMessage / AttackerMessage: Message received by Target/Attacker
#  - Command: Any server command (eg:  give %Attacker log 1)
#  - Sound:  https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html

Effects:
  Head:
    Damage: 1.5
    TargetEffect: 75,CONFUSION,200,1;
    AttackerEffect: 100,Glowing,300,1;20,Speed,300,1;
    AttackerMessage: '&6[AimedShot] You have hit &4%Target &6in the Head for extra damage %TotalDamage (+%BonusDamage) and also he might become confused!.'
    TargetMessage: '&4[AimedShot] You have been hit by %Attacker in the Head for extra damage %TotalDamage (+%BonusDamage)! You may also feel dizzy!'
    Command:
    Sound: ENTITY_PLAYER_LEVELUP
  Body:
    Damage: 0.8
    TargetEffect: 50,WEAKNESS,100,1;50,SLOW,200,1;
    AttackerEffect:
    AttackerMessage: '&6[AimedShot] You have hit &4%Target &6in the Body for less damage %TotalDamage (%BonusDamage), but he might become weaker and slower!'
    TargetMessage: '&4[AimedShot] You have been hit by %Attacker in the Body for less damage %TotalDamage (%BonusDamage), and you also may hit weaker and become slower!'
    Command:
    Sound: ITEM_ARMOR_EQUIP_GOLD
  Arms:
    Damage: 0.5
    TargetEffect: 75,WEAKNESS,200,1;10,SLOW,200,1;
    AttackerEffect: 10,Speed,300,1;
    AttackerMessage: '&6[AimedShot] You have hit &4%Target &6in the Arm for less damage %TotalDamage (%BonusDamage), but he might become weaker and slower!'
    TargetMessage: '&4[AimedShot] You have been hit by %Attacker in the Arm for less damage %TotalDamage (%BonusDamage), but you also may hit weaker and become slower!'
    Command:
    Sound: BLOCK_WOOD_BREAK
  Legs:
    Damage: 0.5
    TargetEffect: 75,SLOW,200,1;
    AttackerEffect: 30,Speed,300,1;
    AttackerMessage: '&6[AimedShot] You have hit &4%Target &6in the leg  for less: %TotalDamage (%BonusDamage), but he walks slower!'
    TargetMessage: '&4[AimedShot] You have been hit by %Attacker in the leg for less damage %TotalDamage (%BonusDamage), but you also may walk slower!'
    Command:
    Sound: BLOCK_GRAVEL_STEP

# DamageAdjusters -----------------------------------------------------------------------------------------------------------------------------------
# - The damage adjusters apply on top of the damage defined above, for the respective combination of Attacker and Target.
# - You can use this for a more granular damage setup/balancing, by raising or lowering a specific value. Defaults are 1.
# - EG: Setting the MobVSPlayer (EvP) values higher will make the PVE experience more difficult.

DamageAdjusters:
  PvP:
    Head: 1
    Body: 1
    Arms: 1
    Legs: 1
  PvE:
    Head: 1
    Body: 1
    Arms: 1
    Legs: 1
  EvP:
    Head: 1
    Body: 1
    Arms: 1
    Legs: 1

# Entity data ---------------------------------------------------------------------------------------------------------------------------------------
# - Do not modify unless you know what you are doing !!!!
# - You can adjust the size of the Head, Body, Arms by changing the values: HeadY, TorsoY, 1/2 Torso With (ArmsXZ).
# - Disable a specific entity by adding # in front
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

Entities:

  # Player, NPCs / Villagers

  PLAYER: 1.38,0.80,0.26
  EVOKER: 1.38,0.80,0.26
  VILLAGER: 1.38,0.80,0.26

  # Zombie Mobs

  ZOMBIE: 1.49,0.80,0.26
  ZOMBIE_CHILD: 0.75, 0.40,0.13
  HUSK:  1.49,0.80,0.26
  ZOMBIE_VILLAGER: 1.49,0.80,0.26
  PIG_ZOMBIE: 1.49,0.80,0.26

  # SKELETON Mobs

  SKELETON: 1.44,0.85,0.29
  WITHER_SKELETON: 1.44,0.85,0.29
  STRAY: 1.44,0.85,0.29

  # Other Mobs

  GIANT: 10.00,7.40,5.80
  IRON_GOLEM: 2.17.0.90,0.67
  ENDERMAN: 2.35,1.62,0.28
  WITCH: 1.37,0.75,0.30
  VEX: 0.60,0.40,0.12
  WITHER: 2.46,0.00,0.64

  # NoArms Mobs (Y, Y, 99.00)
  SHEEP: 0.72,0.46,99.00
  LLAMA: 1.33,0.62,99.00
  DONKEY: 1.00,0.45,99.00
  COW: 0.75,0.60,99.0
  PIG: 0.22,0.22,99.00
  MUSHROOM_COW: 0.79,0.79,99.00
  ZOMBIE_HORSE: 1.20,0.5,99.00
  SKELETON_HORSE: 1.20,0.5,99.00
  HORSE: 1.20,0.5,99.00
  MULE: 1.05,0.50,99.00
  SNOWMAN: 1.24,0.65,99.00
  CREEPER: 1.20,0.40,99.00
  BLAZE: 1.22,0.00,99.00

  # HEAD & BOX Mobs (X, 00.00, 99.00) - DISABLE them if this does not fit your play-style!
  # - Head: 0.05 - most of the hits will return as a Head shot, the rest will count as body
  # - Head: 1-4 - most of the hits will return as a Body shot, the rest will count as Head
  # - Body: 0.00 - no Leg Shots
  # - Arms: 99.00 - no Arm Shots

  CAVE_SPIDER: 0.05,0.00,99.00
  SPIDER: 0.05,0.00,99.00
  RABBIT: 0.05,0.00,99.00

  GUARDIAN: 0.05,0.00,99.00
  ELDER_GUARDIAN: 0.05,0.00,99.00

  POLAR_BEAR: 0.01,0.01,99.00
  WOLF: 0.01,0.01,99.00
  OCELOT: 0.01,0.01,99.00

  GHAST: 4.00,0.00,99.00
  MAGMA_CUBE: 1.00,0.00,99.00
  SLIME: 1.00,0.00,99.00
  SQUID: 0.00,0.00,99.00
  SHULKER: 0.57,0.00,99.00

  # Disabled Mobs (Usually very small or atypical mobs)
  # - remove leading # to make them available

  # SILVERFISH: 00.01,0.00,99.00
  # BAT: 0.01,0.00,0.06
  # ENDERMITE: 0.01,0.00,99.00
  # CHICKEN: 0.46,0.32,99.00

  # ENDER_DRAGON - horizontal flying mob - not clear what body size to use.
  # ENDER_DRAGON: 0.00,0.00,0.00

# CONFIG > ------------------------------------------------------------------------------------------------------------------------------------------

Limitations

Due to some of the limitation below you may want to Not use the plugin in very competitive PvP environments … where players will scream for their pixel-head-shot :D

· Mob hit-boxes are not identical to what a player sees on the screen: small differences can be observed at very close range.
· High-velocity projectiles from close range might not return 100% accurate position. Recommended to keep or raise the limit projectile range in config (default is 5)
· The plugin hit-box logic does not calculate the entity rotation :
· Hitting the arms from side will mostly return a body hit (… as the hit goes through the arms and hits the body)
· For “4 legs” mobs this means that hitting from the back or side, a high-Y hit will result in a head-shot. This can be avoided:
· By tweaking the config and define the Head-Y higher for those mobs. In this case, a hit in the lower level of the head (chin/mouth) will count as a body shot … so there is a compromise to be made … or:
· If you don’t like this, you can entirely disable some mobs from the config.
· Ender Dragon and very small mobs are already disabled by default.​
· Some other plugins are changing the mob names . If you include the mob name in the message (as in my defaults) you will see the “effects”. I will create a workaround for this name change in a future release. Until than just exclude it from the messages or … ignore it.​


Before you go ….


· If you use the plugin and want to see your server here , just add it in the conversation section.
· If you use the plugin in a very creative way , post the ideas in the same section to share with others:
· Ex: … you can allow only snowballs to AimedHit and used them as de-buffers.​
· Be kind in your reviews .... codding is not my strong area :)

Please use this for Issues, help needed or requests.
I won’t be able to help you in the review section due to the 1-reply limitation & improper means to track every conversation.

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

FF: Aimed Hit [ 1.9 | 1.10. |1.11 ] is a free Minecraft Java mod. Compatible with Minecraft 1.9, 1.10, 1.11. Downloaded 353 times (via Spigot). Download it and open it directly in the game.

Explore more