Add JavaDoc snippets and tiny reformats

This commit is contained in:
games647 committed 2023-08-31 12:08:40 +02:00
1 parent b48dfed709
commit 159a6ed37c
8 files changed
+45 -5

No files matched your search

@@ -25,8 +25,17 @@
*/
package com.github.games647.fastlogin.core.hooks;
/**
* Password generator for your auth plugin.
* @param <P> platform dependent player class
*/
@FunctionalInterface
public interface PasswordGenerator<P> {
/**
* Generate a password for a non-registered player
* @param player
* @return daw
*/
String getRandomPassword(P player);
}
@@ -29,9 +29,20 @@ import com.github.games647.fastlogin.core.shared.LoginSession;
import com.github.games647.fastlogin.core.storage.StoredProfile;
/**
* This event fires if the plugin performs an auto login on the platform where the login plugin is.
* This event fires if the plugin performs an auto login on the platform where the login plugin is
*
* {@snippet :
* @EventHandler()
* public void onPlayerLogin(FastLoginAutoLoginEvent loginEvent) {
* StoredProfile profile = loginEvent.getProfile();
* LoginSession session = loginEvent.getSession();
*
* System.out.println("Player: " + session.getUsername() + " is about to be force logged in");
* }
* }
*/
public interface FastLoginAutoLoginEvent extends FastLoginCancellableEvent {
LoginSession getSession();
StoredProfile getProfile();
}
@@ -28,5 +28,6 @@ package com.github.games647.fastlogin.core.shared.event;
public interface FastLoginCancellableEvent {
boolean isCancelled();
void setCancelled(boolean cancelled);
}
@@ -34,6 +34,8 @@ import com.github.games647.fastlogin.core.storage.StoredProfile;
public interface FastLoginPreLoginEvent {
String getUsername();
LoginSource getSource();
StoredProfile getProfile();
}
@@ -33,6 +33,7 @@ import com.github.games647.fastlogin.core.storage.StoredProfile;
public interface FastLoginPremiumToggleEvent {
StoredProfile getProfile();
PremiumToggleReason getReason();
enum PremiumToggleReason {