Kqliber / Expansion-ChangeOutput

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

ChangeOutput Placeholders issue #2

Closed M4h45amu7x closed 2 years ago

M4h45amu7x commented 2 years ago

ChangeOutput Placeholders show empty if the condition contains %playername% and player name beginning or ending with

Placeholder: %changeoutput_equals_{player_name}_{player_name}_&cnope_&a{player_displayname}%

PetyXbron commented 2 years ago

I have the same problem. This needs to be solved.

If a player name contains underscore (_), ChangeOutput evaluates it as the start or end of an argument.

Look at this image, please: Screenshot_631

PetyXbron commented 2 years ago

@Kqliber @BlitzOffline

LordYarkan commented 2 years ago

I see that months have passed with this error and they haven't fixed it then :c

Weasel-Beans commented 2 years ago

I've also run into this issue. It's a shame because it can only function for users that don't use underscores in their names when trying to run commands.

However I may have found a workaround that solves this problem, at least for my issue. Instead of checking for the player's username, check for their UUID, as that does not contain underscores.

For example, use {player_UUID} instead of {player_name}.

But in areas where this doesn't help, I'd also like to see this fixed somehow.

Kqliber commented 2 years ago

ok fine i fixed it The change i've made requires a new format in the placeholder %changeoutput_<options>_input:<your input>_matcher:<to check against>_ifmatch:<output if true>_else:<output if false>% example: %changeoutput_contains_input:some_username_matcher:some_ifmatch:Contains!_else:Doesnt Contains%

I have only tested minimally, so if people could test this too that will be great! https://cdn.discordapp.com/attachments/726924932239327232/990714996172402718/Expansion-ChangeOutput.jar

Weasel-Beans commented 2 years ago

Seems to work good! Haven't noticed any issues.

PetyXbron commented 2 years ago

OMG 😯! It works, thank you. It's a little bit complicated, but updating my 10 holograms with it took me like 6 minutes, so it's worth it. Didn't find any bugs yet.

Kqliber commented 2 years ago

Great! I will be closing this issue now as it seems to work. This build of the expansion has also been uploaded to the ecloud (https://api.extendedclip.com/expansions/changeoutput/), or you may grab it from in-game using /papi ecloud download changeoutput