[SPIGOT-6652] Teleport ID should have random start Created: 16/Jul/21  Updated: 28/Apr/22

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Janmm14 Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: bungeecord, id, packet, teleportation

Version: This server is running CraftBukkit version 3043-Spigot-a25e8ed-9294ebb (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Bungeecord-related.

Problem

Sample setup:

Server A:

  • default server for bungeecord
  • teleports player to spawn on join
  • redirects with PluginMessage immediate to Server B if Server B is empty

Server B:

  • teleports player on join somewhere

With some lag from the player, the teleport accept of the teleport of server A (id 1) gets sent to server B who also sent a teleport to the player with id 1 already, as id 1 is the starting id.

This can cause an anticheat to falsely think a player accepted a teleport and then see the player potentially hundrets of blocks away from its original location.

Suggested solution

Randomize starting teleport id.

Alternative solution

Let bungeecord handle teleportation and teleport accept packets to shift ids.

Although this might solve this problem with bungee for non-spigot servers as well

  • most are using spigot
  • the problem does not appear often as the setup is not common
  • the fix in spigot is much easier and requires less resources.
  • a clash of randomization ids is so uncommon that ignoring it should not cause problems


 Comments   
Comment by Janmm14 [ 28/Apr/22 ]

ping

Generated at Fri Apr 11 16:00:46 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.