public final class MainInfo extends Info
Swath.main| Modifier and Type | Method and Description |
|---|---|
int[] |
class0ports()
Gets the locations of the class 0 ports.
|
int |
currPlanet()
Gets the current planet number.
|
int |
currSector()
Gets the current sector number.
|
void |
dump()
Dumps all the main info in the terminal window.
|
char |
gameId()
Gets the current game id letter.
|
java.lang.String |
gameName()
Gets the current game name.
|
java.io.File |
gamePath()
Gets the current game path.
|
java.util.Map |
gameSettings()
Gets all known game settings.
|
GameVariables |
gameVariables()
Gets all the game variables.
|
java.lang.String |
gameVersion()
Gets the current game version.
|
java.lang.String |
hostname()
Gets the name or IP address of the game server.
|
boolean |
isConnected()
Indicates if SWATH is connected to a game server or not.
|
boolean |
isGoldGame()
Indicates if the current TradeWars game is Gold enabled.
|
boolean |
isHelperMode()
Indicates if the SWATH helper mode is active or not.
|
boolean |
isMBBSGame()
Indicates if the current TradeWars game is MBBS enabled.
|
boolean |
isParsingText()
Indicates if SWATH is parsing incoming text or not.
|
boolean |
isProxyMode()
Indicates if the proxy mode is active or not.
|
boolean |
isTextOutputSuppressed()
Indicates if text output is suppressed or not.
|
int |
lastRobStealSector()
Gets the last sector where you robbed or stole from the port.
|
java.lang.String |
password()
Gets the current game password.
|
int |
port()
Gets the port number of the game server.
|
int |
prompt()
Gets the current prompt.
|
int |
sectors()
Gets the total number of sectors in the database.
|
int |
stardock()
Gets the StarDock location.
|
java.io.File |
swathPath()
Gets the path to the SWATH installation.
|
java.lang.String |
swathVersion()
Gets the current SWATH version.
|
int |
timeOnline()
Returns how long time SWATH has been connected to the current game server.
|
java.lang.String |
username()
Gets the current game username.
|
public int sectors()
throws java.lang.Exception
java.lang.Exceptionpublic int currSector()
throws java.lang.Exception
java.lang.Exceptionpublic int currPlanet()
throws java.lang.Exception
java.lang.Exceptionpublic int prompt()
throws java.lang.Exception
Swath.NO_PROMPT if you're not
at any prompt for the moment.java.lang.ExceptionSwath.NO_PROMPT,
Swath.COMMAND_PROMPT,
Swath.COMPUTER_PROMPT,
Swath.PLANET_PROMPT,
Swath.CITADEL_PROMPT,
Swath.CORP_PROMPT,
Swath.STARDOCK_PROMPTpublic int stardock()
throws java.lang.Exception
java.lang.Exceptionpublic int[] class0ports()
throws java.lang.Exception
java.lang.Exceptionpublic int lastRobStealSector()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String hostname()
throws java.lang.Exception
java.lang.Exceptionport()public int port()
throws java.lang.Exception
java.lang.Exceptionhostname()public java.lang.String username()
throws java.lang.Exception
java.lang.Exceptionpassword()public java.lang.String password()
throws java.lang.Exception
java.lang.Exceptionusername()public java.io.File swathPath()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String swathVersion()
throws java.lang.Exception
java.lang.Exceptionpublic java.io.File gamePath()
throws java.lang.Exception
java.lang.ExceptiongameName()public java.lang.String gameName()
throws java.lang.Exception
java.lang.ExceptiongamePath()public java.lang.String gameVersion()
throws java.lang.Exception
java.lang.Exceptionpublic char gameId()
throws java.lang.Exception
'-' if not known.java.lang.Exceptionpublic java.util.Map gameSettings()
throws java.lang.Exception
java.lang.Exceptionpublic GameVariables gameVariables() throws java.lang.Exception
java.lang.Exceptionpublic boolean isMBBSGame()
throws java.lang.Exception
true if the TW game is MBBS enabled,
otherwise false.java.lang.ExceptionisGoldGame()public boolean isGoldGame()
throws java.lang.Exception
true if the TW game is Gold enabled,
otherwise false.java.lang.ExceptionisMBBSGame()public boolean isConnected()
throws java.lang.Exception
true if connected, otherwise false.java.lang.ExceptiontimeOnline()public int timeOnline()
throws java.lang.Exception
java.lang.ExceptionisConnected()public boolean isHelperMode()
throws java.lang.Exception
true if helper mode is active,
otherwise false.java.lang.Exceptionpublic boolean isProxyMode()
throws java.lang.Exception
true if proxy mode is active,
otherwise false.java.lang.Exceptionpublic boolean isParsingText()
throws java.lang.Exception
true if SWATH is parsing text,
otherwise false.java.lang.Exceptionpublic boolean isTextOutputSuppressed()
throws java.lang.Exception
true if text output is suppressed,
otherwise false.java.lang.Exceptionpublic void dump()
throws java.lang.Exception
java.lang.Exception