Commit Graph
16 Commits
Author SHA1 Message Date
Gabik21 18f9368427 Fix ping response being delayed on 1.7 2020-11-05 12:32:35 +01:00
Gabik21 2217e8a5c9 Fix 1.7 tablist behaving weird with colored names
The 1.7 tablist packet only contains three types of information:

 - Name of the tablist entry (limited to 16 characters including colors)
 - Ping of the entry
 - If this entry needs to be added or removed (client accepts duplicates
 as 'ping update')

The previous logic was trying to preserve parity with
GameProfile#getName returning a stripped down name to have a 'real'
username.
That is fundamentally broken, because entries with duplicate content,
but different colors are very common, especially with custom tablists.

For packets coming from a native 1.7 server we just won't define the
displayname anymore, as there is no such thing as a 'displayname',
because tablist entries are not bound to any player.

Using the Velocity Tablist API to modify existing entries will work, though
the backend server will completely loose control over the entry. Custom
entries added over the Velocity Tablist API will work, but are cut off
by the 16 character limitation.

This commit only fixes the bug, where entries are incorrectly handled
with their stripped name, a lot of the things explained above were
already implemented correctly.
2020-04-07 12:17:02 +02:00
Gabik21 5089da07fc Don't send ping update twice
VelocityTabListEntry#setLatency calls the update method, which
constructs a new packet and sends it to the client.
The backend packet we are processing also reaches the client, therefore
we are sending the same packet twice.
VelocityTabListEntry#setLatencyInternal is the correct method here.
2020-04-02 17:46:24 +02:00
Gabik21 bc8756f715 Readd old constructor 2019-10-31 19:31:47 +01:00
Gabik21 9498376bfa Add missing info to constructor doc 2019-10-28 21:23:28 +01:00
Gabik21 ad291803ea Add missing JavaDoc 2019-10-28 21:18:53 +01:00
Gabik21 802251d273 Add previous server to toString method 2019-10-28 20:49:11 +01:00
Gabik21 7c0a402cca Add previous server to ServerConnectedEvent 2019-10-28 14:45:13 +01:00
Gabik21 e191577afb Fix typo in gitignore 2019-09-29 22:07:49 +02:00
Gabik21 aef0f2ca8c Fix name mapping not being cleared on switch
This fixes a bug where tablist would be messed up for 1.7 clients due to
an internal misconception.
2019-09-05 12:17:19 +02:00
Gabik21 592517b9f3 Remove unnessecary diff 2019-08-29 19:58:00 +02:00
Gabik21 18a56d8b1d Merge remote-tracking branch 'upstream/dev/1.1.0' 2019-08-29 19:47:04 +02:00
Gabik21 ca81b05551 Remove no longer used imports 2019-08-16 11:50:49 +02:00
Gabik21 3a1b5099c9 Merge branch 'dev/1.1.0' of github.com:VelocityPowered/Velocity 2019-07-06 01:08:21 +02:00
Gabik21 d0ad0fac36 Merge branch 'dev/1.1.0' of github.com:VelocityPowered/Velocity 2019-07-05 10:59:29 +02:00
Gabik21 5c314c9068 Add 1.7 Protocol Support 2019-07-01 08:56:22 +02:00