Plasmo Voice

Plasmo Voice

2M Downloads

[FEATURE] Force Overlay via Plugin

ImBadInGerman opened this issue ยท 6 comments

commented

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>

commented

Not sure if it is a good idea to force client-side settings from the server. What's your use-case?

commented

My use-case is a roleplaying server, (not providing a modpack, just the plasmo mod) where playernames are hidden

commented

Why exactly you want this feature to be implemented?
To hide overlay for all players so they can't see playernames in overlay?

commented

Depending on the effort to implement it, only hide the overlay or only hide the player names

commented

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("")
        }
    }

Image

Image

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
            )
        }
    }

Image

commented

Thanks, then I'll build an addon for it, that's actually more than what I wanted