
[FEATURE] Force Overlay via Plugin
ImBadInGerman opened this issue ยท 6 comments
I want to force the Overlay Settings for all players with the config.toml on the specific server (or proxy)
Maybe the config could look something like:
[overlay]
enabled=<true/false>
position=<tl/tr/bl/br>
style=<skin/name/both>
Not sure if it is a good idea to force client-side settings from the server. What's your use-case?
My use-case is a roleplaying server, (not providing a modpack, just the plasmo mod) where playernames are hidden
Why exactly you want this feature to be implemented?
To hide overlay for all players so they can't see playernames in overlay?
Depending on the effort to implement it, only hide the overlay or only hide the player names
Using an addon, you can set source name to empty and name will be omitted in the overlay.
@EventSubscribe
fun onSourceCreated(event: ServerSourceCreatedEvent) {
val source = event.source
if (source is ServerPlayerSource) {
source.setName("")
}
}
You can go even further and hide player names everywhere (not only in overlay, but in settings menu too):
@EventSubscribe
fun onPlayerInfoCreate(event: PlayerInfoCreateEvent) {
event.voicePlayerInfo = with(event.voicePlayerInfo) {
VoicePlayerInfo(
playerId,
"",
isMuted,
isVoiceDisabled,
isMicrophoneMuted
)
}
}