IF icon indicating copy to clipboard operation
IF copied to clipboard

GuiItem ClickEvent not fired when clicking a CycleButton

Open EnTIv opened this issue 2 years ago • 1 comments

        val gui = object : ChestGui(6, "test") {

            val cycleButton = CycleButton(2, 2, 1, 1)

            init {
                Color.values().map {
                    val pane = StaticPane(0, 0, 1, 1)

                    val itemStack = ItemBuilder(Material.STONE).name(it.name).build()

                    val guiItem = GuiItem(itemStack) { event ->
                        println("ClickEvent not fired")
                        println("ClickEvent not fired")
                        println("ClickEvent not fired")
                        println("ClickEvent not fired")
                        println("ClickEvent not fired")
                    }

                    pane.addItem(guiItem, 0, 0)

                    pane
                }.forEach { cycleButton.addPane(it) }

                addPane(cycleButton)
            }
        }

        Bukkit.getOnlinePlayers().forEach {
            gui.show(it)
        }

EnTIv avatar Jan 29 '23 00:01 EnTIv

I can't seem to reproduce this issue. Could you try attempting this on the newest version? This has been an issue in the past, but should've been resolved a year ago.

stefvanschie avatar May 20 '23 18:05 stefvanschie