Refix Javadoc and readd getPlugin comments

This commit is contained in:
Benj 2022-06-22 09:24:11 +08:00
parent b01a29c13f
commit f331afe339
2 changed files with 11 additions and 6 deletions

View File

@ -17,8 +17,8 @@ public interface ExternalAuthenticator {
* Called when an external account creation request is made. * Called when an external account creation request is made.
* @param request The authentication request. * @param request The authentication request.
* *
* For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body. * For developers: Use AuthenticationRequest#getRequest() to get the request body.
* Use {@link AuthenticationRequest#getResponse()} to get the response body. * Use AuthenticationRequest#getResponse() to get the response body.
*/ */
void handleAccountCreation(AuthenticationRequest request); void handleAccountCreation(AuthenticationRequest request);
@ -26,8 +26,8 @@ public interface ExternalAuthenticator {
* Called when an external password reset request is made. * Called when an external password reset request is made.
* @param request The authentication request. * @param request The authentication request.
* *
* For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body. * For developers: Use AuthenticationRequest#getRequest() to get the request body.
* Use {@link AuthenticationRequest#getResponse()} to get the response body. * Use AuthenticationRequest#getResponse() to get the response body.
*/ */
void handlePasswordReset(AuthenticationRequest request); void handlePasswordReset(AuthenticationRequest request);
} }

View File

@ -171,6 +171,11 @@ public final class PluginManager {
.toList().forEach(handler -> this.invokeHandler(event, handler)); .toList().forEach(handler -> this.invokeHandler(event, handler));
} }
/**
* Gets a plugin's instance by its name.
* @param name The name of the plugin.
* @return Either null, or the plugin's instance.
*/
public Plugin getPlugin(String name) { public Plugin getPlugin(String name) {
return this.plugins.get(name); return this.plugins.get(name);
} }