-
-
Notifications
You must be signed in to change notification settings - Fork 795
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 sending multiple messages of notify-enter and notify-leave flag when joining from foreign worlds #4433
Fix sending multiple messages of notify-enter and notify-leave flag when joining from foreign worlds #4433
Conversation
I can't really review on my phone - but the thing I've noticed is, that the metadata mutation was deleted and not re-added, right? |
The teleport listener does the same thing as the world change listener. It removes both lastPlotAccess and lastLocationAccess. One thing I don't quite get is the PERMISSION_WORLDEDIT_BYPASS part. I haven't implemented this into the teleport listener as I don't really understand what it does. Please let me know and I'll add that to the listener if necessary. |
Permissions can be per world so P2 needs to check that the player has WorkdEdit bypass permissions (or not) upon world change |
Thanks a lot for clarifying. I'll add that back. |
@@ -533,7 +533,9 @@ public void onTeleport(PlayerTeleportEvent event) { | |||
// to is identical to the plot's home location, and untrusted-visit is true | |||
// i.e. untrusted-visit can override deny-teleport | |||
// this is acceptable, because otherwise it wouldn't make sense to have both flags set | |||
if (!result && !(plot.getFlag(UntrustedVisitFlag.class) && plot | |||
if (result) { | |||
plotListener.plotEntry(pp, plot); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this only being added here? Do we not want to call plotEntry
if deny teleport doesn't allow entry, but the untrusted visit flag does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I have addressed this issue in the latest commit.
Overview
Fixes #3424
Description
This PR combines the WorldChange and Teleport listeners. The teleport listener is triggered when a player changes worlds anyway, by combining them, plotEntry and plotExit are only called once when a player changes worlds and teleports at the same time, fixing the issue.
Before
messages-before.mp4
After
messages-after.mp4
Submitter Checklist
@since TODO
.