WiIIiam278 / Velocitab

A beautiful and versatile TAB list plugin for Velocity proxies
https://william278.net/project/velocitab
Apache License 2.0
96 stars 27 forks source link

[bug] nametags don't work without color code #112

Closed RalphORama closed 1 year ago

RalphORama commented 1 year ago

I had player nametags stop working after some configuration changes. After a bit of fiddling, I discovered the issue: it appears using just %nametag% or &r%nametag% makes nametags invisible, but &f%nametag% makes them visible.

I originally set my config to look like this because I didn't want VelociTab changing nametags:

nametags:
  default: '%username%'

I tried adding &r to see if that would make nametags visible, but that did not work:

nametags:
  default: '&r%username%'

Adding &f finally fixed the issue:

nametags:
  default: '&f%username%'
WiIIiam278 commented 1 year ago

we actually do handle not setting a color here:

https://github.com/WiIIiam278/Velocitab/blob/7005ceccd7f2dbde41dc34ea263fea0353de8a5b/src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java#L127-L133

but I think something might be messing up here before that point:

https://github.com/WiIIiam278/Velocitab/blob/7005ceccd7f2dbde41dc34ea263fea0353de8a5b/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java#L148

I also note we store nametags per role, which I think will probably break if player-specific placeholders are used (should prob be per-user? maybe not though).

RalphORama commented 1 year ago

Curious. In my experience setting [&r]%username% and running velocitab reload made usernames disappear, then setting &f%username% and reloading made them come back.

I'm running the following plugins:

Velocity

Back-end server

AdvancedPortals, BlockLocker, BuycraftX, Celeste, Chunky, ChunkyBorder, 
CMILib, CoreProtect, DiscordSRV, Essentials EssentialsAntiBuild, EssentialsGeoIP, 
EssentialsProtect, FarmControl, FastLeafDecay, floodgate, GameModeInventories, 
HiddenLorax, HyperDrive, LiteBans LuckPerms, MapModCompanion, OpenInv, 
PAPIProxyBridge, PlaceholderAPI, Plan, PlugManX, ProtocolLib, PvPManager, 
SelectionVisualizer Shopkeepers, SkinsRestorer, TimeControl, Vault, VentureChat, 
ViaBackwards, ViaVersion, VillagerModifications, WorldEdit, WorldGuard 
WorldGuardExtraFlags
alexdev03 commented 1 year ago

If you want the default nametags just remove the default value and make the section empty. nametags: {} If you use the latest version this problem is fixed without changing the section, you only need to recreate the config. I added an option to allow this feature or not.

alexdev03 commented 1 year ago

we actually do handle not setting a color here:

https://github.com/WiIIiam278/Velocitab/blob/7005ceccd7f2dbde41dc34ea263fea0353de8a5b/src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java#L127-L133

but I think something might be messing up here before that point:

https://github.com/WiIIiam278/Velocitab/blob/7005ceccd7f2dbde41dc34ea263fea0353de8a5b/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java#L148

I also note we store nametags per role, which I think will probably break if player-specific placeholders are used (should prob be per-user? maybe not though).

Each user is assigned a specific and unique role, which mitigates any potential issues.

alexdev03 commented 1 year ago

news @RalphORama ?

WiIIiam278 commented 1 year ago

Could you try with the latest Alpha version? https://modrinth.com/plugin/velocitab/version/

WiIIiam278 commented 1 year ago

closing as this should have been fixed in the latest alpha via #108