Discord-MC-Chat icon indicating copy to clipboard operation
Discord-MC-Chat copied to clipboard

[Enhancement] Placeholder API support

Open Bizzonium opened this issue 2 years ago • 7 comments

Checks

Description

https://placeholders.pb4.eu/

Bizzonium avatar Jun 09 '22 15:06 Bizzonium

I will look into this feature after the 1.19 release.

Xujiayao avatar Jun 09 '22 16:06 Xujiayao

Not necessary, complicated, all code needs to be rewritten.

Xujiayao avatar Jun 12 '22 05:06 Xujiayao

I think it would be quite a lot more convenient for the user to be able to use TextPlaceholderAPI instead of raw JSON in the config, for the few settings that enforce it. It would also be convenient to have access to the other placeholders exposed by said API.

Would you at least be willing to consider a PR that implements / makes use of TextPlaceholderAPI, if one were made?

unilock avatar Dec 24 '23 21:12 unilock

I think it would be quite a lot more convenient for the user to be able to use TextPlaceholderAPI instead of raw JSON in the config, for the few settings that enforce it. It would also be convenient to have access to the other placeholders exposed by said API.

Would you at least be willing to consider a PR that implements / makes use of TextPlaceholderAPI, if one were made?

Yes, I have seen many issues mentioning this, as MCDC is incompatible with some mods due to its use of its own method for parsing messages. It would certainly be best if there were any PRs to support it, as long as all existing MCDC functions are retained.

I am not very available at the moment, so PRs and non-urgent issues may not be reviewed promptly.

Xujiayao avatar Dec 25 '23 13:12 Xujiayao

This is confirmed to be a feature that MCDC v3 will support.

Xujiayao avatar Jan 17 '24 17:01 Xujiayao

That's great! I did try to implement it myself a few weeks ago, but determined I wasn't familiar enough with the codebase to implement TextPlaceholderAPI alongside the JSON-based config that was already present.

Regardless, here's my WIP fork, if you're interested: https://github.com/unilock/MC-Discord-Chat/commit/11285063066911e7c8f63d2a73eb780f456308ed

unilock avatar Jan 17 '24 21:01 unilock

OK, thanks for providing it. I'll look into it when I start developing v3. You may submit a Draft PR if you prefer to be given credit for contribution.

Apologize for letting you see my shit mountain code about formatting messages lmao. That's why I don't want to touch it (as long as it works).

Xujiayao avatar Jan 18 '24 03:01 Xujiayao