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 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 -- or, forCloudAuthManager.loginWithCode(String, CloudAuthManager.DeviceLoginListener), the exchange of the supplied code.private voidsay(MessageKey key, Arg... args) Sends a catalogue message; remote replies are also logged as plain text.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloudAuthManager.DeviceLoginListener
onDenied, onExpired, onLinked, onRejected
-
Field Details
-
sender
private final org.bukkit.command.CommandSender sender -
remote
private final boolean remote -
withCode
private final boolean withCodetruefor/ulticloud login <code>.
-
-
Constructor Details
-
LoginOutput
LoginOutput(org.bukkit.command.CommandSender sender, boolean withCode)
-
-
Method Details
-
say
Sends a catalogue message; remote replies are also logged as plain text. -
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 -- or, forCloudAuthManager.loginWithCode(String, CloudAuthManager.DeviceLoginListener), the exchange of the supplied code.- 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)
-