Open iimrudy opened 2 years ago
Yes, this functionality is supported. Every player has it's own TabList. Then you can modify the display name for every player. I haven't tried it yet but I think you should set the display names for a player on the ServerPostConnectEvent.
There is currently no other straight forward way to modify the player entries packet sent from the server to the proxy so right now the player would receive the normal tablist and then receive your display name update packets shortly after.
thank you, ill try that asap
it works! but i must wait for like 100/200 milliseconds after the ServerPostConnect event otherwise the player's Entries() list it's empty
p.Proxy().Event().Subscribe(&proxy.ServerPostConnectEvent{}, 0, func(ev event.Event) {
e := ev.(*proxy.ServerPostConnectEvent)
go func() {
time.Sleep(time.Second) // i've pute a second just to be sure to find elments inside the e.Player().Entries()
// change display names here
}()
}
Let me know if that's enough or you want smth like a "TabListEvent" to do it properly.
actually i think that a proper event might be the best way and it could be very useful to me, but right now it's not critical as "ServerPostConnectEvent" doesn't seem to cause much trouble.
Hi, i wanted to ask if it is possible to change a player's display name on the tablist for everyone or create a team and add suffix and/or prefix to it, in order to always change the tablist, because i would like to add global prefixes/suffixes for a custom ranks and permissions system.
Thanks in advance, have a nice day