public class Console
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ConsoleSettings |
getSettings() |
static void |
reloadSettings()
Forces the console to reload its settings from the settings file.
|
static void |
showDialogOnClose(com.fs.starfarer.api.campaign.InteractionDialogPlugin dialog,
com.fs.starfarer.api.campaign.SectorEntityToken token) |
static void |
showDialogOnClose(com.fs.starfarer.api.campaign.SectorEntityToken token) |
static void |
showException(java.lang.String message,
java.lang.Throwable ex)
Displays the stack trace of a
Throwable . |
static void |
showMessage(java.lang.String message)
Displays a message to the user.
|
static void |
showMessage(java.lang.String message,
org.apache.log4j.Level logLevel)
Displays a message to the user.
|
public static void reloadSettings() throws java.io.IOException, org.json.JSONException
java.io.IOException
- if the JSON file at
CommonStrings.PATH_SETTINGS
does not exist
or can't be opened.org.json.JSONException
- if the JSON is malformed or missing entries.public static ConsoleSettings getSettings()
public static void showMessage(java.lang.String message, org.apache.log4j.Level logLevel)
message
- The message to show.logLevel
- If this is equal to/higher than the "consoleLogLevel"
setting, this message will be logged in Starsector.log.
public static void showMessage(java.lang.String message)
message
- The message to show.
public static void showException(java.lang.String message, java.lang.Throwable ex)
Throwable
.
message
- An optional message to show before the stack trace. Can be
null
.ex
- The Throwable
whose stack trace will be shown.
public static void showDialogOnClose(com.fs.starfarer.api.campaign.InteractionDialogPlugin dialog, com.fs.starfarer.api.campaign.SectorEntityToken token)
public static void showDialogOnClose(com.fs.starfarer.api.campaign.SectorEntityToken token)