Player Visibility Api

Easily manage player visibility in a similar way to area protection

API / Library Multiplayer-focused

Download (2 KB)
For Luanti 5.10 and above

How do I install this?

player_visibility_api 🔗

Provides an abstraction for player object observers. Makes it work similar to Luanti's core protection API. In that, mods are encouraged to override the existing function while making a false condition call the old function.

So you would establish conditions for player visibility by first making a local copy of the pv_api.is_visible, then replace the function with a function that checks your desired conditions and either returns false or the result of the old function. That way, much like core.is_protected, multiple mods can take advantage.

I hope this will be useful for mods that do things like let players block other players.

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.