Open john1234brown opened 1 month ago
@adde0109 your more then welcome to compile these and include them as your own just give proper references where needed for AuthMeVelocity code usage is all! https://github.com/john1234brown/Ambassador https://github.com/john1234brown/NexAuth-spigot
I've done this with the NextAuth Plugin instead using the same setup as AuthMeVelocity it is worth note trying to do it for AuthMe support for others who would like to use this with authMe rather than my version and setup!
Make a PR please
To allow another Velocity plugin to access the
MapWithExpiration
hashmap in yourAmbassador
plugin, you can create an API that provides a way for other plugins to interact with it. Here's a basic example of how you can create such an API:Define an interface that exposes the functionality you want to provide to other plugins. This interface should be placed in a separate package to ensure it's accessible to other plugins.
Implement the interface in your
Ambassador
class and register an instance of this class as a service that other plugins can access.Here's how you can do it:
org.adde0109.ambassador.api
):Ambassador
class:Ambassador
class as a service in yourAmbassador
plugin'sonProxyInitialization
method:MapWithExpiration
hashmap from yourAmbassador
plugin like this:By following these steps, you can create an API for your
Ambassador
plugin that allows other Velocity plugins to access theMapWithExpiration
hashmap.By allowing access to at least this HashMap will allow the authme plugins to properly bypass authorization for when users are being sent to modded servers as they require the ambassador plugin to disconnect them and reconnect bypassing the authorization hub so doing this will still be secure will ensuring they properly logged in on the lobby to go to the modded server before hand etc..