Class Settings
java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.config.Settings
- All Implemented Interfaces:
IConfig
The plugin's config
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Every Discord event is a different type of message that can be sent into the in-game chatstatic enum
Every in-game event is a different type of message that can be sent into the relay channel -
Field Summary
FieldsModifier and TypeFieldDescriptionThe bot tokenSkin to use when /say or /dcbroadcast is used.The current color paletteThe path of the color palette we want to usefinal Path
The config pathThe channel ID for the bot to send console logs to.The invite link to the relay's discord server (must be filled manually)List of user IDs to treat as "operators", which lets them run console commands from DiscordOptional extensions for things like embeds for waypointsEvents that the bot will relay from the relay channelEvents that the bot will send to the relay channelint
Maximum message size that will be relayed to the MC chatThe channel ID for the bot to send and receive opchat messages in.boolean
Allow operators to be highlighted when the /players command is used in Discordboolean
Allow players names to be sent when the /players command is used in DiscordThe channel ID for the bot to listen and send messages in for the relayboolean
Show the server icon when /about is used in DiscordChanges what URL the skin images are grabbed fromboolean
Prefer string timestamp over discord's relative timestamp when /about is runboolean
Use display names instead of discord usernames when relaying Discord messages to MCboolean
Use nicknames instead of discord usernames/display names when relaying Discord messages to MCFor the JSON file -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
version
For the JSON file -
configPath
The config path -
colorPalette
The current color palette -
colorPalettePath
The path of the color palette we want to use -
botToken
The bot token -
relayChannelId
The channel ID for the bot to listen and send messages in for the relay -
consoleChannelId
The channel ID for the bot to send console logs to. Also accepts operator commands -
opchatChannelId
The channel ID for the bot to send and receive opchat messages in. Must have the extension enabled for it to work. -
discordInvite
The invite link to the relay's discord server (must be filled manually) -
useDisplayNames
public boolean useDisplayNamesUse display names instead of discord usernames when relaying Discord messages to MC -
useNicknames
public boolean useNicknamesUse nicknames instead of discord usernames/display names when relaying Discord messages to MC -
maxMessageSize
public int maxMessageSizeMaximum message size that will be relayed to the MC chat -
publicPlayerNames
public boolean publicPlayerNamesAllow players names to be sent when the /players command is used in Discord -
publicOperatorNames
public boolean publicOperatorNamesAllow operators to be highlighted when the /players command is used in DiscordAlso shown when /about is ran.
-
skinProvider
Changes what URL the skin images are grabbed from -
showServerIcon
public boolean showServerIconShow the server icon when /about is used in Discord -
broadcastSkinName
Skin to use when /say or /dcbroadcast is used. -
enabledChatExtensions
Optional extensions for things like embeds for waypoints -
enabledEvents
Events that the bot will send to the relay channel -
enabledDiscordEvents
Events that the bot will relay from the relay channel -
useDiscordRelativeTimestamp
public boolean useDiscordRelativeTimestampPrefer string timestamp over discord's relative timestamp when /about is run -
discordOperators
List of user IDs to treat as "operators", which lets them run console commands from Discord
-
-
Constructor Details
-
Settings
Settings constructor
-
-
Method Details
-
load
Description copied from interface:IConfig
Loads the config- Specified by:
load
in interfaceIConfig
- Returns:
- itself after loading
- Throws:
IOException
- This can fail if the file could not be read correctly
-
save
public void save()Description copied from interface:IConfig
Writes the config -
upgrade
Description copied from interface:IConfig
Upgrades the config from an earlier version -
create
public void create()Description copied from interface:IConfig
Creates the config file and directories
-