WesJD / AnvilGUI

Capture user input in Minecraft through an anvil GUI in under 20 lines of code
MIT License
466 stars 111 forks source link

onChanged method #301

Open WesJD opened 8 months ago

WesJD commented 8 months ago

Originally posted by fishermedders March 30, 2023 I would like to see an onChange method, that runs whenever the input has changed.

I can't say what others' use cases would be, but mine would be to use it to create a searchable shop, with the items being in the lower inventory.

If there is anything I can do to help, please let me know :)

WesJD commented 8 months ago

@fishermedders suggested this, didn't even see it since it was in Discussions. Marking as enhancement help wanted. Could be a neat feature.

mastercake10 commented 8 months ago

This has already been discussed in #231, I even created a PR for this, #232. Maybe we just need this onPrepare event without the book thingy / title change ability on type.

Lets see if this feature is still needed.

btw I can't access the discussions, giving a 404-error.

fishermedders commented 8 months ago

This would be my exact use case too, with the lower inventory searching things. Would love to see this feature implemented :)

OakLoaf commented 2 days ago

I just started using the library with the main intention of using it as a fancy text input. I'd like to be able to modify the output item to display the text input with colours formatted, as far as I am aware this isn't possible without an onChanged method of some form.

It'd be lovely to have this implemented, it seems like mastercake was nearly there as it was :)