Package com.ultikits.ultitools.commands
Class CloudLoginCommand.LoginOutput
java.lang.Object
com.ultikits.ultitools.commands.CloudLoginCommand.LoginOutput
- All Implemented Interfaces:
CloudAuthManager.DeviceLoginListener
- Enclosing class:
CloudLoginCommand
private static final class CloudLoginCommand.LoginOutput
extends Object
implements CloudAuthManager.DeviceLoginListener
Renders the device login's outcomes to the sender that ran
/ulticloud login. For a
remote sender every line is also logged to the server console, colour codes stripped, because
an RCON reply is closed when its dispatch returns and the code arrives later from the login
session's executor; the console and players see each line once.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidlogToConsole(String line) private static longminutes(long seconds) voidonAlreadyLinked(String serverName) voidonCode(String verificationUri, String userCode, String verificationUriComplete, long expiresInSeconds) A device code was issued; show it to the operator.voidonRateLimited(long seconds) voidonRequestFailed(String reason) voidThe device-code request is about to be made.private voidSendsline; for a remote sender also logs it to the console at INFO.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ultikits.ultitools.utils.CloudAuthManager.DeviceLoginListener
onDenied, onExpired, onLinked, onRejected
-
Field Details
-
REQUESTING
-
REQUESTING_REMOTE
-
sender
private final org.bukkit.command.CommandSender sender -
remote
private final boolean remote
-
-
Constructor Details
-
LoginOutput
LoginOutput(org.bukkit.command.CommandSender sender)
-
-
Method Details
-
say
Sendsline; for a remote sender also logs it to the console at INFO. -
logToConsole
-
onAlreadyLinked
- Specified by:
onAlreadyLinkedin interfaceCloudAuthManager.DeviceLoginListener- Parameters:
serverName- the name this server is linked under, ornull
-
onRateLimited
public void onRateLimited(long seconds) - Specified by:
onRateLimitedin interfaceCloudAuthManager.DeviceLoginListener- Parameters:
seconds- the remaining cooldown before another login attempt is allowed
-
onRequesting
public void onRequesting()Description copied from interface:CloudAuthManager.DeviceLoginListenerThe device-code request is about to be made.- Specified by:
onRequestingin interfaceCloudAuthManager.DeviceLoginListener
-
onCode
public void onCode(String verificationUri, String userCode, String verificationUriComplete, long expiresInSeconds) Description copied from interface:CloudAuthManager.DeviceLoginListenerA device code was issued; show it to the operator.- Specified by:
onCodein interfaceCloudAuthManager.DeviceLoginListener- Parameters:
verificationUri- the page where the owner enters the codeuserCode- theXXXX-XXXXcodeverificationUriComplete- the page with the code filled inexpiresInSeconds- how long the code stays valid
-
onRequestFailed
- Specified by:
onRequestFailedin interfaceCloudAuthManager.DeviceLoginListener- Parameters:
reason- why no device code could be obtained
-
minutes
private static long minutes(long seconds)
-