Closed Azodox closed 2 years ago
Thank you @DevNatan for your prompt response and fix but I think you had a little problem with publishing? I can't retrieve the dependency and jitpack says that : https://jitpack.io/com/github/DevNatan/inventory-framework/2.5.1/build.log in the logs.
Nevermind, just needed to wait a few minutes.
Is there an existing issue for this?
🐛 Describe the bug
I have a PaginatedView that overrides onItemRender method, and as shown in an example in the README (and also the Javadoc of onItemRender method), I retrieve the rendered item with viewItem (second parameter) and try to add a click handler with .onClick (after a couple of other methods such as .withItem) and among other stuff, I try to print debugs to see if it works but apparently it doesn't because, when I click on the item, nothing appears in the console.
Then, I tried to add a simple item in the inventory but, unlike before, in the constructor of the class. And I, of course, called the method .onClick with a simple System.out.println and it works!
Therefore, my theory is that, strangely, the method onClick doesn't when it's called from onItemRender method for some reason. Here is my code :
✔️ Expected behavior
When I click on an item using onClick method in onItemRender method it, at least, shows a message in the console.
👣 Steps to Reproduce
💻 Platform
⭐ Version
1.19
✍️ Additional context
I'm running Paper.