Comments (3)
Is this issue also present on 1.20?
from invui.
No
server.pluginManager.registerEvents(object : Listener {
@EventHandler
fun onLoad(event: PlayerJoinEvent) {
val productionGui = ScrollGui.items()
.setStructure(
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x"
)
.addIngredient('x', Markers.CONTENT_LIST_SLOT_HORIZONTAL)
.addContent(SimpleItem(ItemWrapper(ItemStack(Material.STONE))))
.build()
val inputInventoryGui = Gui.normal()
.setStructure(
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x"
)
.addIngredient('x', VirtualInventoryManager.getInstance().createNew(UUID.randomUUID(), 18))
.build()
val outputInventoryGui = Gui.normal()
.setStructure(
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x"
)
.addIngredient('x', VirtualInventoryManager.getInstance().createNew(UUID.randomUUID(), 18))
.build()
val tabGui = TabGui.normal()
.setStructure(
"# # 0 1 # 2 3 # #",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x",
"x x x x x x x x x"
)
.setTabs(listOf(productionGui, inputInventoryGui, outputInventoryGui))
.addIngredient('x', Markers.CONTENT_LIST_SLOT_HORIZONTAL)
.addIngredient('0', object : TabItem(0) {
override fun getItemProvider(gui: TabGui?): ItemProvider =
ItemWrapper(ItemStack(Material.CHEST))
})
.addIngredient('1', object : TabItem(1) {
override fun getItemProvider(gui: TabGui?): ItemProvider =
ItemWrapper(ItemStack(Material.STONE))
})
.addIngredient('2', object : TabItem(2) {
override fun getItemProvider(gui: TabGui?): ItemProvider =
ItemWrapper(ItemStack(Material.STONECUTTER))
})
.addIngredient('#', ItemBuilder(Material.GRAY_STAINED_GLASS_PANE).setDisplayName(Component.empty()))
.build()
server.scheduler.runTask(plugin, Runnable {
Window.single()
.setGui(tabGui)
.setTitle("Станок")
.build(event.player)
.open()
})
}
}, plugin)
from invui.
This issue was because of me. I have used
override fun handleClick(clickType: ClickType, player: Player, event: InventoryClickEvent) {
player.closeInventory()
}
instead of
override fun handleClick(clickType: ClickType, player: Player, event: InventoryClickEvent) {
server.scheduler.runTask(plugin, Runnable { player.closeInventory() })
}
from invui.
Related Issues (20)
- HeadTexture#of prints a stacktrace
- NoClassDefFoundError: xyz/xenondevs/invui/item/ItemProvider on Spigot 1.20 HOT 1
- Can't use the dependency in maven for some reason HOT 1
- this.gui.setContent(); alternative and problem with addItems
- Erorr when enable my plugin with invui HOT 4
- Error when use SkullBuilder(uuid) HOT 1
- Paged Tabs GUI support
- Items stay in your inventory after server restart when using multi window HOT 5
- Bold formatting not resetting in lore HOT 2
- [Bug] Wrong version HOT 1
- shadowJar is broken for this library HOT 2
- Paper 1.20.5+ Mojang Mapped runtime issues HOT 5
- Adding api to the server? HOT 1
- Checking if clicking inside player inventory
- Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/EntityHuman HOT 6
- Changing Window Title to display new font image
- How do I update every item on a GUI if one item change it status?
- Bold formatting not resetting in lore HOT 1
- Stylable GUI Items HOT 1
- Items saved in player inventory on server crash. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invui.