Class RRDiscordBridge
java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.RRDiscordBridge
RRDiscordBridge's main common class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ConfigDirectory
The config directory for the server softwarestatic RRDiscordBridge
The static instance of RRDiscordBridgestatic ILogger
The server's loggerme.scarsz.jdaappender.ChannelLoggingHandler
JDA's console logger -
Constructor Summary
ConstructorsConstructorDescriptionRRDiscordBridge
(IServer server, ILogger logger, ConfigDirectory dir) Sets up part of the plugin -
Method Summary
Modifier and TypeMethodDescriptiongetBot()
static long
static String
Initializes fields that require an instance of RRDiscordBridge to be notnull
void
reload()
setSupportedFeatures
(SupportedFeatures features) Sets the current instance ofSupportedFeatures
with a new onevoid
shutdown
(boolean reloading) Sends a shutdown message and stops the Discord bot.
-
Field Details
-
instance
The static instance of RRDiscordBridge -
logger
The server's logger -
logHandler
public me.scarsz.jdaappender.ChannelLoggingHandler logHandlerJDA's console logger -
configDir
The config directory for the server software
-
-
Constructor Details
-
RRDiscordBridge
Sets up part of the pluginBecause some fields need access to the
static instance of RRDiscordBridge
, you must callinitialize()
after setting the static instance to fully initialize the plugin.- Parameters:
server
- The server impl to uselogger
- The logger to use
-
-
Method Details
-
getServerStartTime
public static long getServerStartTime()- Returns:
- The server start timestamp
-
initialize
Initializes fields that require an instance of RRDiscordBridge to be notnull
-
shutdown
public void shutdown(boolean reloading) Sends a shutdown message and stops the Discord bot. -
getVersion
- Returns:
- The plugin's version
-
getChatExtensions
- Returns:
- The instance of
ChatExtensions
-
reload
- Throws:
IOException
-
getSupportedFeatures
- Returns:
- The current instance of
SupportedFeatures
-
setSupportedFeatures
Sets the current instance ofSupportedFeatures
with a new one -
getServer
- Returns:
- The instance of
server
-
getSettings
- Returns:
- The instance of
settings
-
getCommandRegistry
- Returns:
- the instance of
commandRegistry
-
getBot
- Returns:
- the instance of
bot
-