You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.
You should upgrade or use an alternative browser.
- Author ArteffCods
- Creation date
Placeholders can be used in commands on hit or kill, along with the messages in config.yml.
- Added support for PlaceholderAPI
- Split commands on hit depending on whether a player or an entity is hit.
- Improved throwing weapons default placeholders.
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%!'
Nexo support
- Refactored some parts of the code
- Removed useless debug code
- Minor fixes, including performance
- Added support for Nexo!
In any weapon config, add:
Code (YAML):
nexo:
enabled: true
nexo-id: amethyst_hammer
Or use /tw register <name> while holding a Nexo item.
Added commands that are run when killing a player and when killing an entity.
Please add the following to your config:
Code (YAML):
# Commands executed when the weapon kills a non-player entity.
commands-on-kill-entity:
- 'say %thrower% hit entity %hit% with %item%'
# Commands executed when the weapon kills a player.
commands-on-kill-player:
- 'say %thrower% hit player %hit% with %item%'
If you want to avoid running hit commands when killing, you can add this to your on-hit config:
Code (Text):
on-hit:
...
run-commands-on-kill: false
- Fixed shields not blocking weapons
- Added config option for making throwing weapons go through shields
- Added Hex Color codes support
- Slightly changed how crafting recipes are added. Should be more consistent over reloads.