Vanish API
captbunzo opened this issue ยท 2 comments
I have a simple plugin I've written for my server which provides a few commands. Among these is a custom /who command. I'd like to be able to add support to my plugin to respect /vanished players (i.e. not show them in the /who list).
Is there an API or some way I can identify that a player is vanished and therefore should not be shown?
Several. Easiest would be checking the player's metadata. Get metadata "vanished", if it exists then check its asBoolean value. true for vanished false for not. If it doesn't exist VNP isn't on the server.
This way, you never need to even depend on VNP in your code.
Thanks very much for your quick reply, @mbax. Thank you donation made. :)