jakobkmar / KSpigot

Extended Spigot and Bukkit API for Kotlin
https://jakobkmar.github.io/KSpigot
GNU General Public License v3.0
134 stars 35 forks source link

Gui Buttons not working after changing page back and forth #15

Closed NyCodeGHG closed 3 years ago

NyCodeGHG commented 3 years ago

When I switch the page via the gotoPage function and I switch back, things like buttons aren't working anymore.

image

jakobkmar commented 3 years ago

That is probably the reason why the internal function was internal (lol).

NyCodeGHG commented 3 years ago

hahaha

NyCodeGHG commented 3 years ago

Is there another way how i could change the page without the use of pageChanger()? Or maybe a way to provide an onClick lambda and decide if it should change the page or not.

jakobkmar commented 3 years ago

Why exactly can't you just use the pageChanger element?

NyCodeGHG commented 3 years ago

As you maybe have seen in the gif. I want to execute something different when you do a right click on the item. I only want to change the page when the user clicks with the left mouse button.

NyCodeGHG commented 3 years ago

I did a little bit testing and the same thing is happening when using pageChanger

NyCodeGHG commented 3 years ago

I fixed it. I was using a wrong function somewhere. It was not related to KSpigot.