[1.8 to 1.21] Throwing Weapons

Plugins [1.8 to 1.21] Throwing Weapons 2.5.3

Pro Download
  • 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%!'
  • Refactored some parts of the code
  • Removed useless debug code
  • Minor fixes, including performance
  • Added support for Nexo!
Nexo support

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
  • ItemsAdder support fix
  • Fixed shields not blocking weapons
  • Added config option for making throwing weapons go through shields
  • Added 1.21.3 and 1.21.4 support
  • Fixed Purpur support (on 1.21.1 mainly)
  • Added Hex Color codes support
  • Slightly changed how crafting recipes are added. Should be more consistent over reloads.
  • Fixed Oraxen Support for Right/Left click weapons
Back
Top Bottom