ConditionalEvents icon indicating copy to clipboard operation
ConditionalEvents copied to clipboard

bug with remove_item and wait_ticks

Open kazotaruumc72 opened this issue 2 months ago • 4 comments

Events: wheat: type: custom custom_event_data: event: me.rivaldev.harvesterhoes.api.events.RivalBlockBreakEvent player_variable: getPlayer() variables_to_capture: - '%crop_type%;getCrop().getType()' conditions: - '%crop_type% contains WHEAT' actions: default: - "console_command: coreplugin:kcore giveitem %player_name% nexo:wheat 1-3" - "console_command: eco give pixelcoins %player_name% 1" - "console_command: cyberlevel addExp 1 %player_name%" - "wait_ticks: 1" # 10-20 ticks = 0.5-1 seconde - "remove_item: %checkitem_remove_mat:WHEAT%" - "wait_ticks: 1" # 10-20 ticks = 0.5-1 seconde - "remove_item: %checkitem_remove_mat:WHEAT_SEEDS,amt:{checkitem_mat:WHEAT_SEEDS}%"

https://imgur.com/a/4RYdsPb version: This server is running Purpur version 1.21.8-2497-HEAD@a49cdb9 (2025-09-19T01:51:04Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)

  • You are running the latest version

kazotaruumc72 avatar Oct 01 '25 19:10 kazotaruumc72

Are you sure this placeholder is correct? %checkitem_remove_mat:WHEAT_SEEDS,amt:{checkitem_mat:WHEAT_SEEDS}%

What is the problem/bug exactly? Also, try without the wait_ticks, and try removing the last action.

Ajneb97 avatar Oct 01 '25 20:10 Ajneb97

yes i am sure

it remove just the wheat and not wheat and wheat seeds

kazotaruumc72 avatar Oct 02 '25 09:10 kazotaruumc72

What is the problem/bug exactly? Also, try without the wait_ticks, and try removing the last action.

same problem

kazotaruumc72 avatar Oct 02 '25 10:10 kazotaruumc72

What version of PlaceholderAPI are you using? I see multiple problems here:

  • This variable is incorrect: %checkitem_remove_mat:WHEAT_SEEDS,amt:{checkitem_mat:WHEAT_SEEDS}%. The correct usage for removing the wheat seeds is %checkitem_remove_mat:WHEAT_SEEDS% which is working correctly for me.
  • For some reason your placeholder is returning a true/false value, in my case it returns yes/no, in the latest version of PlaceholderAPI.

Ajneb97 avatar Oct 03 '25 18:10 Ajneb97