inventory-framework icon indicating copy to clipboard operation
inventory-framework copied to clipboard

How to use AnvilInput?

Open nslowfx opened this issue 3 months ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

🐛 Describe the bug

I trying to use AnvilInput but not getting any results, can you show me a example of how to use? the documentation is wrong

✔️ Expected behavior

work anvil input.

👣 Steps to Reproduce

val anvilInput = AnvilInput.createAnvilInput("")

override fun onInit(config: ViewConfigBuilder) {

    config.title("Insira o nome do jogador")
        .type(ViewType.ANVIL)
        .use(anvilInput)

}
override fun onFirstRender(render: RenderContext) {
    render.firstSlot(itemTemplateOf(Material.PAPER) {
        name = "Nome do jogador"
    })
}

💻 Platform

  • [X] Bukkit
  • [ ] Sponge
  • [ ] Other

⭐ Server Version

1.20.4

📚 Library Version

3.1.0-RC

✍️ Additional context

No response

nslowfx avatar Nov 17 '24 19:11 nslowfx