Skip to content

Restore /spawn cooldown for player self teleports - #203

Merged
Maxlego08 merged 1 commit into
developfrom
codex/remove-cooldown-from-/spawn-command
Oct 17, 2025
Merged

Maxlego08 merged 1 commit into
developfrom
codex/remove-cooldown-from-/spawn-command

Conversation

@Maxlego08

Copy link
Copy Markdown
Owner

Summary

  • restore the standard timed teleport flow when players use /spawn on themselves
  • keep instant teleportation for console or staff teleporting other players while preserving spawn messaging
  • leave the spawn location validity checks in place

Testing

  • ./gradlew test --stacktrace --console=plain (fails: dependencies return HTTP 403 from upstream Maven repositories)

https://chatgpt.com/codex/tasks/task_e_68f223210238832198dc632ffc00e080

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +48 to +55
boolean teleportingSelf = this.user != null && user == this.user;

if (teleportingSelf) {
user.teleport(location, Message.TELEPORT_MESSAGE_SPAWN, Message.TELEPORT_SUCCESS_SPAWN);
} else {
user.teleportNow(location);
message(user, Message.TELEPORT_SUCCESS_SPAWN);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Instant teleports skip safety adjustments

Switching non‑self /spawn teleports to user.teleportNow(location) bypasses the safety logic in User.teleport(...) that moves players to a safe block and centers them when teleportSafety or teleportToCenter are enabled. As a result, staff or console teleporting someone else can now place the target inside solid blocks or off‑center, which was previously prevented. This regression affects anyone using safety settings and should be reverted to the safe path or replicated before calling teleportNow.

Useful? React with 👍 / 👎.

@Maxlego08
Maxlego08 merged commit 42c00ea into develop Oct 17, 2025
2 checks passed
@Maxlego08
Maxlego08 deleted the codex/remove-cooldown-from-/spawn-command branch October 20, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant