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

Add work-around for nonsensical teleport events from Spigot. #152

Closed
wants to merge 2 commits into from

Conversation

@totemo
Copy link

commented Aug 9, 2019

On using a nether or end portal, the player is tagged with transient metadata recording the details of the teleport event for TeleportCause.NETHER_PORTAL or TeleportCause.END_PORTAL. A Runnable is scheduled to remove that metadata immediately after in case it is unused.

When the subsequent TeleportCause.UNKNOWN event is raised, WorldBorder handling of the event is aborted if the player has the metadata. Other teleports with TeleportCause.UNKNOWN are unaffected.

There are two Logger.info() statements commented out for convenience of testing. If you would prefer, I can remove those and resubmit this PR.

This fixes #131, et. al.

References:

@JonMagon

This comment has been minimized.

Copy link

commented Aug 9, 2019

It works fine. Thanks.

@Brettflan

This comment has been minimized.

Copy link
Owner

commented Aug 12, 2019

Thanks for looking into this and providing a pull request with a workaround, and particularly for posting a detailed bug report over on the Spigot issue tracker. It is slightly interesting to see it's much the same bug as popped up a few major versions back, as expected, with a mismatched coordinate / world combination sent out in teleport events.

However, I very much prefer to avoid adding in kludgy workarounds to this plugin in order to address temporary Spigot/CraftBukkit bugs. This is absolutely nothing against your code or methods, it's just kludgy by nature of what's needed to work around this sort of incorrect information being sent out through events, and only temporarily needed since it should hopefully eventually be fixed on the other end.

@aescraftbr

This comment has been minimized.

Copy link

commented Aug 13, 2019

Is it possible to compile this changes and make it available as a non-default build? I want to use the world border but with this bug (and I know is not world border fault) I rather not use, but in the other hand I can only open my server after this spigot bug is corrected.

Thanks in advance.

@totemo

This comment has been minimized.

Copy link
Author

commented Aug 14, 2019

No worries. I understand your stance, Brettflan.

@totemo totemo closed this Aug 14, 2019

@totemo

This comment has been minimized.

Copy link
Author

commented Aug 14, 2019

@aescraftbr Until Spigot acknowledges my bug report and fixes it, your best bet is to compile my fork:

git clone https://github.com/NerdNu/WorldBorder/
mvn
@JonMagon

This comment has been minimized.

Copy link

commented Aug 14, 2019

@Brettflan but you could make it with another branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.