Skip to content

Conversation

@Jakubk15
Copy link
Member

@Jakubk15 Jakubk15 commented Oct 4, 2025

Described in #1133

Resolves #1133

@Jakubk15 Jakubk15 self-assigned this Oct 4, 2025
@Jakubk15 Jakubk15 requested a review from a team as a code owner October 4, 2025 16:45
@Jakubk15 Jakubk15 added the 🔧 enhancement Enhances existing function label Oct 4, 2025
@Jakubk15 Jakubk15 changed the title Extend /back functionality to per-death and per-teleport GH-1192 Extend /back functionality to per-death and per-teleport Oct 4, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request extends the /back command to differentiate between death and teleport locations, which is a great feature enhancement. The implementation is mostly solid, but I've found a critical issue in the configuration migration that could lead to data loss for users. Additionally, there are several opportunities for refactoring to reduce code duplication and improve readability, particularly in BackCommand and BackService. I've also noted a design consideration regarding a shared configuration setting that could be improved.

…ion/migrations/Migration_0010_Move_back_to_dedicated_section.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Member

@Rollczi Rollczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeleportService ma stare metody jeszcze

Copy link
Contributor

@igoyek igoyek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the instructions of others and it will look good :)

Copy link
Member

@vLuckyyy vLuckyyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code would become much simpler if you stopped using Pairs. They are not required.

@Jakubk15
Copy link
Member Author

Jakubk15 commented Oct 9, 2025

@vLuckyyy you would have two caches then and the only "simplification" is that you put stuff into a separate cache rather than a Pair

@P1otrulla P1otrulla removed their request for review October 9, 2025 09:49
@P1otrulla
Copy link
Member

@vLuckyyy you would have two caches then and the only "simplification" is that you put stuff into a separate cache rather than a Pair

Imo better create object for it, simple and easy access.
I showed it at the meeting.

@Jakubk15 Jakubk15 requested review from ChudziudgiToJa, P1otrulla, Pawelusze, Qbiterv, VerniQ, igoyek, imDMK and mydelkonivea and removed request for igoyek and imDMK October 18, 2025 16:29
@vLuckyyy vLuckyyy requested review from imDMK and removed request for ChudziudgiToJa, Pawelusze, Qbiterv, VerniQ and mydelkonivea October 18, 2025 22:42
Copy link
Member

@CitralFlo CitralFlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that ok? or github says sth weird?
image

@Jakubk15
Copy link
Member Author

is that ok? or github says sth weird?

image

Will inspect

@Jakubk15 Jakubk15 requested a review from vLuckyyy October 25, 2025 12:22
Optional<Position> deathLocation = this.backService.getDeathLocation(target.getUniqueId());

if (deathLocation.isPresent()) {
this.backService.teleportBack(target, PositionAdapter.convert(deathLocation.get()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

te dwie metody idealnie nadają się do serwisu a gettery można wywalić :D

"# Specify world name to always teleport to that world"
})
public String world = "world";
public String world = "world_nether";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm czemu tak?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A separate permission for allowing the /back command to be used on death

7 participants