Notify the sign owner when a warp falls back to the sign block - #165
Merged
Conversation
warpPlayer(world, user, owner) has two teleport paths: the normal one, used when the spot in front of the sign is safe, fires WarpInitiateEvent, respects vanished players, and tells the sign owner that someone warped to them; and a fallback, used when no safe spot in front exists, which teleported the visitor directly onto the sign's own block and did none of that. Owners silently missed warp visits whenever the fallback ran. The fallback is common on cramped islands — a ChunkBlock island starts as a single chunk, so warp signs often sit at the platform edge with void in front, which fails isSafeLocation and always takes the silent path. That is how this surfaced: owners got warp messages in AOneBlock but never in ChunkBlock. The fallback now routes through the same warpPlayer completion path as a normal warp, so the event, the vanish check, the sounds, and the owner notification behave identically wherever the visitor lands. The sign's facing is used for the arrival yaw, matching normal warps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7xSdVPS5vRu6wqf6XshRq
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
warpPlayer(world, user, owner)has two teleport paths:isSafeLocation, the visitor is warped there via the privatewarpPlayer(...), which firesWarpInitiateEvent, respects vanished players, plays the sound after a successful teleport, and sends the sign ownerwarps.player-warped.This PR routes the fallback through the same completion path as a normal warp, so behavior is identical wherever the visitor lands. The sign's facing is now also used for the arrival yaw in the fallback, matching normal warps.
Why
Server admins noticed that island owners get "X warped to your warp sign!" in AOneBlock but never in ChunkBlock. The cause is geometry: a ChunkBlock island starts as a single chunk, so warp signs typically sit at the platform edge with void in front —
isSafeLocation(inFront)fails and the silent fallback always runs. The same silent path can trigger in any gamemode whenever the block in front of a sign is unsafe.Testing
Full suite passes (79 tests). The sign-specific branches aren't reachable in unit tests because MockBukkit doesn't populate the sign
Tagconstants, so this was verified by inspection; a manual test on a ChunkBlock island (warp sign at the platform edge, void in front) is the reproduction case.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y7xSdVPS5vRu6wqf6XshRq