ItemJoin

ItemJoin

157k Downloads

MORE COMMAND COST

Phoenix-99 opened this issue ยท 1 comments

commented

At this moment exist a commands-cost, and you need to have exact amount of money to be able to execute commands from items,
but it will really nice more "commands-cost", maybe "commands-custom", it works with placeholderapi's placeholders, this is a example

commands-custom: %player_health% = 20
this placeholder return into player health number, so do you need to have = 20 of health to be able to execute the command

another example is from AlonsoLevels plugins.
commands-custom: %alonsolevels_level% <= 100
this placeholder return into player's level number, so do you need to have <= 100 of level to be able to execute the command.

commented

Hi! Sorry, it took a bit to get to this, your requested feature has been added in the latest snapshot!
I utilized the already existing commands-cost which will now accept integers and placeholders.
Furthermore, I improved the commands-cost to allow for double instead of integer so values like 100.8 or 1.5 will now be acceptable.
In this example, the cost to execute the command increases with each player death;

  example-item:
    id: DIAMOND
    slot: 1
    interact:
    - 'player: say hello world!'
    commands-cost: '%player_deaths%'
    triggers: join, respawn, world-switch

Link; https://ci.craftationgaming.com/downloads
Remember to remove your old ItemJoin.jar file

Let me know!~
Thanks for submitting this feature request.

EDIT:
The official release is now available.
Link; https://www.spigotmc.org/resources/itemjoin.12661/download?version=557378