public class ConnectCommand extends java.lang.Object implements GUICommand
GUICommand
which connects to a Crossfire server.Modifier and Type | Field and Description |
---|---|
private GuiStateManager |
guiStateManager
The
GuiStateManager instance. |
private GUIText |
hostNameInputField
The host name input field.
|
Constructor and Description |
---|
ConnectCommand(GuiStateManager guiStateManager,
GUIText hostNameInputField)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
@NotNull private final GuiStateManager guiStateManager
GuiStateManager
instance.@NotNull private final GUIText hostNameInputField
public ConnectCommand(@NotNull GuiStateManager guiStateManager, @NotNull GUIText hostNameInputField)
guiStateManager
- the gui state manager instancehostNameInputField
- the host name input fieldpublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand