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

Fix editing signs on locations with yaw/pitch and opening sign editor when another inventory is opened #596

merged 1 commit into from Dec 9, 2017


Copy link

@kaenganxt kaenganxt commented Dec 8, 2017

This pull request fixes two bugs with opening the sign editor from a plugin:

  1. When calling openSignEditor with non-zero yaw and pitch, a sign edit is not accepted by the server, because the given location and the edit location from the client (which includes only block coordinates) don't match (The check is here). This PR just sets yaw and pitch to zero.

  2. If openSignEditor is called while an inventory is opened, there's the following problem:

  • A sign edit packet is sent to the player
  • The client closes the old inventory silently and opens the sign editor
  • The player edits the sign, the edit packet is sent and processed
  • When interacting with the creative inventory the server still thinks the old inventory is open and kicks the player

To fix it, I'm closing the inventory before sending the sign edit packet.

I was also wondering why a cancelled SignChangeEvent produces a log message on level warning. Is there a reason behind this behaviour?

Copy link

@mastercoms mastercoms commented Dec 8, 2017

The reason for the warning is because Glowstone was in a very heavy developmental state and there were many debug messages scattered about, being logged. Now that Glowstone is gearing towards production use, we can use a debugging level.

@mastercoms mastercoms self-assigned this Dec 8, 2017
@mastercoms mastercoms self-requested a review Dec 8, 2017
@mastercoms mastercoms merged commit 7f3fb14 into GlowstoneMC:dev Dec 9, 2017
1 check passed
1 check passed
license/cla Contributor License Agreement is signed.
@kaenganxt kaenganxt deleted the kaenganxt:signEditFixes branch Dec 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants