Skip to content

Conversation

@MrScopes
Copy link
Contributor

@MrScopes MrScopes commented Dec 18, 2025

Problem

Currently, there's no way to get respawn reason in the respawn event. The issue with this is the respawn event is also called when the player comes back to the overworld from the end. This also fixes the misleading description of the respawn event docs.
image

Solution

Adds ExprRespawnReason using event values for PlayerRespawnEvent

Testing Completed

on respawn:
    broadcast "%respawn reason%"
    if respawn reason is death:
        broadcast "When the player dies and presses the respawn button."
    else if respawn reason is end portal:
        broadcast "When the player exits the end through the end portal."
    else if respawn reason is plugin:
        broadcast "When a plugin respawns the player."

Tests on 1.21.10 and 1.21 separately
image
image

Supporting Information


Completes: none
Related: none
AI assistance: none

@MrScopes MrScopes requested a review from a team as a code owner December 18, 2025 02:06
@MrScopes MrScopes requested review from Burbulinis and TheMug06 and removed request for a team December 18, 2025 02:06
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Dec 18, 2025
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Dec 18, 2025
@github-project-automation github-project-automation bot moved this to In Review in 2.14 Releases Dec 18, 2025
@MrScopes
Copy link
Contributor Author

current build failure due to them changing PlayerRespawnEvent in 1.21.5+ to instead inherit getRespawnReason from AbstractRespawnEvent. AbstractRespawnEvent didn't exist until 1.21.5
AbstractRespawnEvent 1.21.5 to current
PlayerRespawnEvent 1.21.4 and prior

@sovdeeth sovdeeth changed the base branch from master to dev/feature December 18, 2025 04:22
@MrScopes
Copy link
Contributor Author

current build failure due to them changing PlayerRespawnEvent in 1.21.5+ to instead inherit getRespawnReason from AbstractRespawnEvent. AbstractRespawnEvent didn't exist until 1.21.5 AbstractRespawnEvent 1.21.5 to current PlayerRespawnEvent 1.21.4 and prior

added reflection for <1.21.5. Tested on 1.21 paper and 1.21.10 paper

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.14 Releases Dec 18, 2025
@skriptlang-automation skriptlang-automation bot added feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed needs reviews A PR that needs additional reviews labels Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.

Projects

Status: Awaiting Merge

Development

Successfully merging this pull request may close these issues.

3 participants