Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Item glitch #168

Closed
weihao opened this issue Nov 26, 2019 · 7 comments
Closed

Item glitch #168

weihao opened this issue Nov 26, 2019 · 7 comments
Assignees
Labels
bug A failure in the project that causes it to produce an incorrect or unexpected result. critical An error that has a disastrous impact on the server that needs immediate attention. help wanted The maintainer is needing some help!

Comments

@weihao
Copy link
Owner

weihao commented Nov 26, 2019

iRedFox:
I'm having a bug where if you hold something in your hand and shift right click enchantment table to open the gui it will be gone.

@weihao weihao added bug A failure in the project that causes it to produce an incorrect or unexpected result. critical An error that has a disastrous impact on the server that needs immediate attention. labels Nov 26, 2019
@weihao weihao self-assigned this Nov 26, 2019
@weihao weihao added the help wanted The maintainer is needing some help! label Nov 26, 2019
@weihao
Copy link
Owner Author

weihao commented Nov 26, 2019

The bug is very specific:

  1. The player must be holding an item.
  2. Opens the gui and the player is able to shift right click the item.
  3. Item will be placed in the GUI and will disappear once the GUI is closed.

This bug will not be reproduced if the player is not holding an item.

@lgou2w
Copy link
Collaborator

lgou2w commented Nov 27, 2019

When the handheld item is not a block, call two player interact events

lgou2w added a commit that referenced this issue Nov 27, 2019
@lgou2w
Copy link
Collaborator

lgou2w commented Nov 27, 2019

I did not conduct all-depth testing. if needed, please checkout master-#168 .

@weihao
Copy link
Owner Author

weihao commented Nov 27, 2019

When the handheld item is not a block, call two player interact events

Are you describing the issues or it should've called two events?

@lgou2w
Copy link
Collaborator

lgou2w commented Nov 28, 2019

Yes, right click will called two events. This is client side problem.

@lgou2w
Copy link
Collaborator

lgou2w commented Nov 29, 2019

I know, Because since Minecraft 1.9 has left and right hand holding feature. When the item held is not a block, right click will trigger twice when sneaking, one is the main (right) hand and the other is the off (left) hand.

@lgou2w
Copy link
Collaborator

lgou2w commented Nov 29, 2019

Yes, PlayerInteractEvent in Bukkit 1.9 added a hand property.

@weihao weihao pinned this issue Nov 30, 2019
weihao added a commit that referenced this issue Dec 31, 2019
fix(#168): fix item glitch problem
@weihao weihao closed this as completed Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A failure in the project that causes it to produce an incorrect or unexpected result. critical An error that has a disastrous impact on the server that needs immediate attention. help wanted The maintainer is needing some help!
Projects
None yet
Development

No branches or pull requests

2 participants