Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift-clicking within a cLuaWindow does not resend player inventory if the OnClicked callback calls CloseWindow #5517

Open
sleirsgoevy opened this issue Jun 22, 2023 · 1 comment

Comments

@sleirsgoevy
Copy link
Contributor

sleirsgoevy commented Jun 22, 2023

Client version: 1.8.9
Server OS: Linux
Cuberite Commit id: 4fe144d

Expected behavior

OnClicked callback cancels the shift-click. The item stays in the cLuaWindow inventory, player inventory is unchanged.

Actual behavior

The item remains in the player inventory, but only client-side.

Steps to reproduce the behavior

  1. Create a cLuaWindow with a SetOnClicked callback that closes the window server-side and returns true
  2. Use SetSlot() to put an item inside the window
  3. Use OpenWindow() to open the window on the client
  4. On the client, shift-click on the item

Server log

Irrelevant.

@sleirsgoevy sleirsgoevy changed the title Shift-clicking within a cLuaWindow does not resend player inventory Shift-clicking within a cLuaWindow does not resend player inventory if the OnClicked callback calls CloseWindow Jun 22, 2023
@sleirsgoevy
Copy link
Contributor Author

For plugin writers that come across this: if you want your chest UI to have a close button, arrange for the actual close to happen on the next tick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant