Conversation
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copilot stopped work on behalf of
dmccoystephenson due to an error
September 21, 2025 16:13
Member
|
Try again |
1 similar comment
Member
|
Try again |
Member
|
@copilot Try again |
…mprove messaging Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Contributor
Author
I've enhanced the fix with a more comprehensive solution. The updated implementation now:
Changes in commit 4c8f9e2:
This addresses the root cause while providing a better user experience. |
Copilot
AI
changed the title
[WIP] @Dans-Plugins/Dans-Essentials/issues/132
Fix IllegalArgumentException occurring when using /de back - Enhanced with join location tracking
Sep 21, 2025
Copilot stopped work on behalf of
dmccoystephenson due to an error
September 21, 2025 17:51
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.
Fix IllegalArgumentException occurring when using /de back
This PR fixes a critical crash that occurs when players use the
/de backcommand without having a previous teleport location stored. The solution includes both immediate crash prevention and enhanced functionality to improve the user experience.Issue Description
The issue occurs because:
player.teleport(null)throws IllegalArgumentException: locationSolution Implemented
Enhanced fix with two-part approach:
Immediate crash prevention: Added null safety check in BackCommand to prevent the IllegalArgumentException and provide user-friendly error messaging
Enhanced functionality: Modified JoinListener to track the player's join location as their initial "back" location, ensuring players always have a meaningful location to return to
Changes Made
Benefits
/de backcommand is always functional for all playersThe fix addresses both the immediate crash issue and the underlying usability problem, making the
/de backcommand robust and user-friendly.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.