Hook for detecting click in cWindow, currently only cLuaWindow
#1
Created a branch on github that contains changes for a hook to detect and deny the click action in cLuaWindow.
Branch:
https://github.com/Seadragon91/cuberite/...ndow_click

The hook function has this params:
Code:
function MyOnWindowClicking(Player, LuaWindow, ClickedItem, ClickAction, SlotNum)

The ClickAction is already in available on lua side.
I created a example plugin that opens a lua window with command /openit. It contains a few items that runs a command / open a window on clicking it. The window is generated from the ini file in the plugin folder.

The biggest question is now do we want to detect a click in all windows? Brewing stand, furnace, crafting table, minecart with chest?
If yes then we need to add something with that we can get the owner of the window (block entity, minecart entity) and we would need to export all windows to lua.

In plugin SkyBlock I added a challenge window as test, works same like in a java skyblock plugin that I created years ago. Can be opened with "/challenges inv"
https://github.com/Seadragon91/SkyBlock/...indow_test
Reply
Thanks given by:


Messages In This Thread
Hook for detecting click in cWindow, currently only cLuaWindow - by Seadragon91 - 06-06-2017, 03:45 AM



Users browsing this thread: 5 Guest(s)