Kqliber / Expansion-ChangeOutput

Change outputs of a placeholder on certain conditions
6 stars 0 forks source link

Problem when nested change outputs #5

Closed Trekki03 closed 9 months ago

Trekki03 commented 1 year ago

When nesting "change output" with a placeholder in the nested "change output", result isn't properly past.

Example:

Works fine: %changeoutput_equals_input:{worldguard_region_has_flag_tnt}_matcher:yes_ifmatch:{changeoutput_contains_input:Testinput_matcher:tnt=DENY_ifmatch:OFF_else:ON}_else:%

Gives strange output: %changeoutput_equals_input:{worldguard_region_has_flag_tnt}_matcher:yes_ifmatch:{changeoutput_contains_input:Testinput_matcher:{worldguard_region_flags}_ifmatch:OFF_else:ON}_else:%

Output: image

For me it look like, the parser doesn't correctly recognizes the second "change output" and ends the true part of the main "change output" where the second one actually ends. But this only happens, if the input of the second "change ouput" is an placeholder.

Kqliber commented 9 months ago

This is a limitation with PAPI itself supporting only 1 depth of inner bracket placeholders However, There is a utils expansion to workaround this. https://api.extendedclip.com/expansions/utils/