Class CloudLoginCommand

java.lang.Object
com.ultikits.ultitools.abstracts.command.BaseCommandExecutor
com.ultikits.ultitools.commands.CloudLoginCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor

@CmdExecutor(description="UltiCloud Authentication Commands", alias="ulticloud", requireOp=true) public class CloudLoginCommand extends BaseCommandExecutor
Links this server to UltiCloud with a device code (protocol v2). Usage: /ulticloud login — Link this server to UltiCloud /ulticloud logout — Unlink this server and revoke its credential /ulticloud status — Show link and connection status /ulticloud reconnect — Retry the UltiCloud connection now
  • Field Details

  • Constructor Details

    • CloudLoginCommand

      public CloudLoginCommand()
  • Method Details

    • login

      public void login(org.bukkit.command.CommandSender sender)
      Starts the device login. Deliberately not @RunAsync (#740): since 6.3.0 a synchronous body on the primary thread runs inside the dispatch (BaseCommandExecutor, #541), so the first line reaches the sender before the dispatch returns -- the moment RCON sends its reply. The network work runs on the login session's own executor (inside CloudAuthManager.login(CloudAuthManager.DeviceLoginListener)), so this body never blocks the server thread.
      Parameters:
      sender - the console, RCON, or another console-class sender
    • logout

      public void logout(org.bukkit.command.CommandSender sender)
    • refusePanelAuthentication

      private static boolean refusePanelAuthentication(org.bukkit.command.CommandSender sender)
      Backstop for synchronous aliases and nested panel commands. The dispatcher refuses direct forms with command_blocked; here the console-only refusal is normal command output. Player eligibility remains the existing command validator's responsibility.
    • status

      public void status(org.bukkit.command.CommandSender sender)
    • reconnect

      public void reconnect(org.bukkit.command.CommandSender sender)
    • handleHelp

      protected void handleHelp(org.bukkit.command.CommandSender sender)
      Description copied from class: BaseCommandExecutor
      Handles the help command. Override to provide custom help.
      Specified by:
      handleHelp in class BaseCommandExecutor
      Parameters:
      sender - the command sender
    • isRemoteSender

      private static boolean isRemoteSender(org.bukkit.command.CommandSender sender)
      Returns:
      true for RCON -- checked explicitly, because RemoteConsoleCommandSender is not a ConsoleCommandSender -- and for any other sender that is neither the console nor a player
    • say

      private static void say(org.bukkit.command.CommandSender sender, org.bukkit.ChatColor colour, String key, Object... values)
    • sendLine

      private static void sendLine(org.bukkit.command.CommandSender sender, String line)