java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.config.Settings
All Implemented Interfaces:
IConfig

public class Settings extends Object implements IConfig
The plugin's config
  • Field Details

    • version

      public String version
      For the JSON file
    • configPath

      public final transient Path configPath
      The config path
    • colorPalette

      public transient ColorPalette colorPalette
      The current color palette
    • colorPalettePath

      public Path colorPalettePath
      The path of the color palette we want to use
    • botToken

      public String botToken
      The bot token
    • relayChannelId

      public String relayChannelId
      The channel ID for the bot to listen and send messages in for the relay
    • consoleChannelId

      public String consoleChannelId
      The channel ID for the bot to send console logs to. Also accepts operator commands
    • opchatChannelId

      public String opchatChannelId
      The channel ID for the bot to send and receive opchat messages in. Must have the extension enabled for it to work.
    • discordInvite

      public String discordInvite
      The invite link to the relay's discord server (must be filled manually)
    • useDisplayNames

      public boolean useDisplayNames
      Use display names instead of discord usernames when relaying Discord messages to MC
    • useNicknames

      public boolean useNicknames
      Use nicknames instead of discord usernames/display names when relaying Discord messages to MC
    • maxMessageSize

      public int maxMessageSize
      Maximum message size that will be relayed to the MC chat
    • publicPlayerNames

      public boolean publicPlayerNames
      Allow players names to be sent when the /players command is used in Discord
    • publicOperatorNames

      public boolean publicOperatorNames
      Allow operators to be highlighted when the /players command is used in Discord

      Also shown when /about is ran.

    • skinProvider

      public String skinProvider
      Changes what URL the skin images are grabbed from
    • showServerIcon

      public boolean showServerIcon
      Show the server icon when /about is used in Discord
    • broadcastSkinName

      public String broadcastSkinName
      Skin to use when /say or /dcbroadcast is used.
    • enabledChatExtensions

      public List<String> enabledChatExtensions
      Optional extensions for things like embeds for waypoints
    • enabledEvents

      public List<Settings.Events> enabledEvents
      Events that the bot will send to the relay channel
    • enabledDiscordEvents

      public List<Settings.DiscordEvents> enabledDiscordEvents
      Events that the bot will relay from the relay channel
    • useDiscordRelativeTimestamp

      public boolean useDiscordRelativeTimestamp
      Prefer string timestamp over discord's relative timestamp when /about is run
    • discordOperators

      public List<String> discordOperators
      List of user IDs to treat as "operators", which lets them run console commands from Discord
  • Constructor Details

    • Settings

      public Settings(Path configPath)
      Settings constructor
  • Method Details

    • load

      public Settings load() throws IOException
      Description copied from interface: IConfig
      Loads the config
      Specified by:
      load in interface IConfig
      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
      Specified by:
      save in interface IConfig
    • upgrade

      public Settings upgrade()
      Description copied from interface: IConfig
      Upgrades the config from an earlier version
      Specified by:
      upgrade in interface IConfig
      Returns:
      itself after upgrading
    • create

      public void create()
      Description copied from interface: IConfig
      Creates the config file and directories
      Specified by:
      create in interface IConfig