- Added support for PlaceholderAPI
- Split commands on hit depending on whether a player or an entity is hit.
- Improved throwing weapons default placeholders.
Placeholders can be used in commands on hit or kill, along with the messages in config.yml.
Example config:
Code (YAML):
on-hit
:
# Commands to execute when the weapon hits an entity.
# Commands executed as console!
#
# %tw_thrower% -> The name of the player who threw the weapon.
# %tw_hit% -> Player: their name.
# Entity without name: Type of entity. (e.g. "Pig", "Villager").
# Entity w/ custom name: Its custom name.
# %tw_item% -> The display name of this weapon. (of the item).
# %tw_item_original% -> The display name defined in Throwing Weapons
# This will be different from %tw_item% if
# using Nexo, Oraxen, or ItemsAdder.
# %tw_id% -> The ID of the item.
#
# --- Supports PlaceholderAPI!
# The player is always the thrower. You can also use the name of
# the other player with %tw_hit%
# Example: %otherplayer_level_%tw_thrower%%
commands-on-hit-player
:
- 'say
%player_name% (%player_level%) hit %tw_hit% (%otherplayer_level_%tw_hit%%) with %tw_item%!'
commands-on-hit-entity
:
- 'say
%player_name% hit entity %tw_hit% with %tw_id%!'