Skip to content

Configuration

Pavel edited this page Nov 13, 2019 · 22 revisions

Note: 🏗 This page is under construction and not optimized. It's just a dump of information. Later updates will clean it up.


When you first start up DiscordSRV, the files config.yml, linking.yml, messages.yml, and voice.yml are automatically generated within plugins/DiscordSRV/.
Latest config files from stable branch: config.yml | linking.yml | messages.yml | voice.yml
Latest config files from development branch: config.yml | linking.yml | messages.yml | voice.yml

These config files contain informative comments to help explain what each option does. The explanations below give more insight on each option.

Quick Links

config | linking | messages | voice | References

blueprint

Debug.. (Level, JDA, JDARestActionStacks)
would translate to
DebugLevel, DebugJDA, DebugJDARestActionStacks

config

ConfigVersion | BotToken | Channels | DiscordConsoleChannelId[⁽¹⁾]

Debug.. (Level, JDA, JDARestActionStacks)

CancelConsoleCommandIfLoggingFailed | RespectChatPlugins | ForcedLanguage

Experiment_Jdbc.. (AccountLinkBackend, TablePrefix, Username, Password)

Experiment_WebhookChatMessage.. (Delivery, AvatarUrl)

Experiment_MCDiscordReserializer | PrintGuildsAndChannels | ForceTLSv12 | PartnerPebbleHost | DisabledPluginHooks | DiscordGameStatus

DiscordChatChannel.. (DiscordToMinecraft, MinecraftToDiscord, TruncateLength, TranslateMentions, Prefix, RolesAllowedToUseColorCodesInChat, BroadcastDiscordMessagesToConsole, RequireLinkedAccount, BlockBots, BlockedIds, ColorTranslations, RolesSelectionAsWhitelist, RolesSelection)

DiscordConsoleChannel.. (LogRefreshRateInSeconds, UsageLog, BlacklistActsAsWhitelist, BlacklistedCommands, DoNotSendPhrasesActsAsWhitelist, DoNotSendPhrases, RegexFilter, RegexReplacement, Levels)

DiscordChatChannelConsoleCommand.. (Enabled, NotifyErrors, Prefix, RolesAllowed, Whitelist, WhitelistBypassRoles, WhitelistActsAsBlacklist, Expiration, ExpirationDeleteRequest)

DiscordChatChannelListCommand.. (Enabled, Message, Expiration, ExpirationDeleteRequest)

DiscordChatChannel.. (BlockedPhrases, CutPhrases, Regex, RegexReplacement)

ChannelTopicUpdater.. (ChannelTopicsAtShutdownEnabled, RateInMinutes)

DiscordCannedResponses

MinecraftDiscordAccount.. (LinkedConsoleCommands, UnlinkedConsoleCommands, LinkedRoleNameToAddUserTo, LinkedSetDiscordNicknameAsInGameName, LinkedAllowRelinkBySendingANewCode)

GroupRoleSynchronization.. (RoleIdsToSync, CycleTime, RemoveRolesOnUnlink)

ServerWatchdog.. (Enabled, Timeout, MessageCount)

BanSynchronization.. (DiscordToMinecraft, DiscordToMinecraftReason, MinecraftToDiscord)

ConfigVersion

This is for the plugin to handle config updates. This is not something you should modify manually.

BotToken[⁽¹⁾]

This is the token that your bot will use to connect to DiscordSRV. You can find it at the developer page for your bot. https://discordapp.com/developers/applications/me

Channels

This is a list of Minecraft text channels and their discord equivalent. The first channel in the list is used as the main channel. All additional messages like start/stop/join/quit/death/etc go to it.
The format is "Minecraft-Channel-Name": "Discord-Channel-ID". If you have no special chat channel plugin installed, the default is always global. In Discord you can get a channel's ID by right clicking a channel and choosing "Copy ID" after enabling Developer Mode in Settings → Appearance → Developer Mode.
If you have a plugin installed that supports additional chats, you can define more than one pair of linked channels. What you can't do is have multiple "Channels" with the same ID or Channel name.
Example:

Channels: {"global": "219559668236681216", "admin": "221419146028646401"}

Supported chat channel plugins: Herochat, Legendchat, LunaChat, TownyChat, UltimateChat, VentureChat, and others.

DiscordConsoleChannelId[⁽¹⁾]

This is the ID of the channel in which the Minecraft server console will be forwarded. It is highly recommended that you do not use the same Discord channel for chat and console!

Debug:

These options allow you to debug several parts of DiscordSRV. It is recommended that you do not touch these unless specifically needed.

DebugLevel
  1. Disables debug messages.
  2. Enables debug messages.
  3. Enables debug messages w/ Stack Trace.
DebugJDA

Enables/Disables debug messages for JDA.

DebugJDARestActionStacks

Enables/Disables the creation of exceptions for every JDA execution.

CancelConsoleCommandIfLoggingFailed

This option disables running a console command through discord if logging is unsuccessful.

RespectChatPlugins

This option makes it so if another chat plugin cancels a chat event, it doesn't get processed by DiscordSRV. Do not change this.

ForcedLanguage[⁽¹⁾]

This option forcefully changes the language to the specified type.
Currently Supported Languages: [EN,FR,DE,JA,KO,NL,ES,RU,ET,ZH]

Experiment_Jdbc:

This allows the ability to connect to SQL databases.

Experiment_JdbcAccountLinkBackend

jdbc:mysql://HOST:PORT/DATABASE?useSSL=false Replace the capitalized words with the designated information.

Experiment_JdbcTablePrefix

The table prefix for the database.

Experiment_JdbcUsername

The username for the database.

Experiment_JdbcPassword

You get the gist.

Experiment_Webhook:

Replaces minecraft messages with a webhook of the minecraft player's username and skin.

Experiment_WebhookChatMessageDelivery

Enable/disable the experimental webhook feature

Experiment_WebhookChatMessageAvatarUrl

The link to pull the player's skin from. Placeholders: {uuid}, {username}

Experiment_MCDiscordReserializer

Transforms minecraft messages formatted with format codes into Discord format, and vice versa (&lHello &oWorld 🢂 "Hello World" 🢀 **Hello** *World*)

PrintGuildsAndChannels

Prints Guilds and Channels in the console on startup.

ForceTLSv12

Force set SSL to TLSv1.2

PartnerPebbleHost

Send a sponsored message on startup on how good PebbleHost is with our promo code DiscordSRV at checkout for 15% off the first three bills.

DisabledPluginHooks

This is a list of disabled Plugin hooks. It is highly recommended to not mess with this option.
Available hooks:

  • Chat
    • FancyChat, Herochat, LegendChat, LunaChat, TownyChat, UltimateChat, VentureChat
  • Vanish
    • Essentials, PhantomAdmin, SuperVanish, VanishNoPacket
  • World
    • Multiverse
  • Vault

DiscordGameStatus

This is the game information "Playing ..." shown for the bot in Discord.

DiscordChatChannel:

DiscordChatChannelDiscordToMinecraft

Whether or not to send messages from Discord to Minecraft. Either true or false.

DiscordChatChannelMinecraftToDiscord

Whether or not to send messages from Minecraft to Discord. Either true or false.

DiscordChatChannelTruncateLength

Maximum length of messages from Discord to Minecraft, longer messages are going to be cut off and the discord message will be reacted with "💬 ❗".

DiscordChatChannelTranslateMentions

Whether or not to translate mentions like @Person for Minecraft to Discord messages

DiscordChatChannelPrefix

The character(s) required at the start of a message for it to be sent from Minecraft to Discord. Set to "" to not require a prefix.

DiscordChatChannelRolesAllowedToUseColorCodesInChat

States which roles are enabled to use colors when sending messages from Discord to Minecraft. Set to [] to disable.

DiscordChatChannelBroadcastDiscordMessagesToConsole

Whether or not to print messages sent to Discord in Minecraft console. This will broadcast into the console channel if the console channel is enabled.

DiscordChatChannelRequireLinkedAccount

Whether or not to require players have their Discord account linked to their Minecraft to have their Discord messages sent to Minecraft

DiscordChatChannelBlockBots

Whether or not bots should be blocked from Discord -> MC chat

DiscordChatChannelBlockedIds

IDs of discord users (or bots) that should not have their messages processed & sent to MC

DiscordChatChannelColorTranslations

States which codes are replaced with which colors. Author needs to have at least one of the roles configured in DiscordChatChannelRolesAllowedToUseColorCodesInChat for this to work. Don't touch anything unless you know what you are doing.

DiscordChatChannelRolesSelectionAsWhitelist

If the following list should be treated as a whitelist (true) or a blacklist (false)

DiscordChatChannelRolesSelection

List of roles that are should be filtered from all of a user's roles

DiscordConsoleChannel:

The console channel is the text channel that receives messages which are then run as server commands by the console. This includes having the server's console being forwarded line by line.

DiscordConsoleChannelLogRefreshRateInSeconds

Rate in seconds between new lines being sent. Unless you want really fast log, leave it at default. If you change it below 1.5 you can get ratelimited, so the bot is blocked from sending messages for a short time.

DiscordConsoleChannelUsageLog

The file that logs all commands being executed by users in the console channel, and only those commands. Commands executed either in Minecraft or using the server console directly are not logged.

DiscordConsoleChannelBlacklistActsAsWhitelist

If the command blacklist should be interpreted as whitelist, so that only the commands on the list can be executed using the console channel. Either true (whitelist mode) or false (blacklist mode).

DiscordConsoleChannelBlacklistedCommands

The blacklisted (or whitelisted) commands for the console channel. Include commands with huge outputs (Discord messages can only be 2000 characters long), commands bypassing the security system, etc. Replace with [] to not blacklist any commands.

DiscordConsoleChannelDoNotSendPhrasesActsAsWhitelist

If the DiscordConsoleChannelDoNotSendPhrases is used as a whitelist. If true, only matching messages are sent.

DiscordConsoleChannelDoNotSendPhrases

Phrases that should not be sent to the console channel

DiscordConsoleChannelRegexFilter

The Regex-Filter to be applied to messages from the console sent to Discord. If you are unfamiliar with Regex, it is likely that you don't need this option.

DiscordConsoleChannelRegexReplacement

What the Regex-Filter matches are replaced with.

DiscordConsoleChannelLevels

The different debug levels that are sent to the console. Options: ["debug", "info", "warn", "error"]

DiscordChatChannelConsoleCommand:

These options control the ability to say "!c kick Notch", or whatever the prefix is to run a command, as the console, from a registered chat channel.

DiscordChatChannelConsoleCommandEnabled

If this feature is enabled at all. Set to false to disable.

DiscordChatChannelConsoleCommandNotifyErrors

Whether or not to send a user who tries to run a command without permission a message that they don't have permission.

DiscordChatChannelConsoleCommandPrefix

Prefix to use for console commands in the chat channel.

DiscordChatChannelConsoleCommandRolesAllowed

List of roles for which this feature is enabled. If you don't want anyone to be able to use it, set DiscordChatChannelConsoleCommandEnabled to false.

DiscordChatChannelConsoleCommandWhitelist

List of commands that can be run using the prefix set in DiscordChatChannelConsoleCommandPrefix and the command, e.g. !c tps

DiscordChatChannelConsoleCommandWhitelistBypassRoles

List of roles which can bypass the whitelist, e.g. execute any command. Set to [] to disable.

DiscordChatChannelConsoleCommandWhitelistActsAsBlacklist

Whether or not to use the whitelist in blacklist mode, e.g. all commands except for listed ones can be run.

DiscordChatChannelConsoleCommandExpiration

Time in seconds until the response to a command is automatically removed. Set to 0 to disable.

DiscordChatChannelConsoleCommandExpirationDeleteRequest

Whether or not to also remove the original, user-sent command as well.

DiscordChatChannelListCommand:

DiscordChatChannelListCommandEnabled

Whether or not this command is enabled.

DiscordChatChannelListCommandMessage

The required message for the playerlist to be sent.

DiscordChatChannelListCommandExpiration

Time in seconds until the playerlist-message is going to be deleted again. Set to 0 to disable.

DiscordChatChannelListCommandExpirationDeleteRequest

hether or not the requesting message should be deleted as well.

DiscordChatChannel:

DiscordChatChannelBlockedPhrases

DiscordSRV will not process messages that include these phrases

DiscordChatChannelCutPhrases

These phrases will be removed before being sent to Discord

DiscordChatChannelRegex

Filter what gets sent from Minecraft->Discord using Regex

DiscordChatChannelRegexReplacement

Regex replacement for above

ChannelTopicUpdater:

ChannelTopicUpdaterChannelTopicsAtShutdownEnabled

whether or not the channel topics should be changed at server shutdown. set to false to disable

ChannelTopicUpdaterRateInMinutes

amount of minutes between automatically updating the channel topics with fresh information. Minimum is 5 minutes, which was suggested by a Discord Developer.

DiscordCannedResponses

These are commands that will be sent as a reply in the channel it was ran in. Syntax is {"TRIGGER": "RESPONSE", "TRIGGER": "RESPONSE", ...} If you do not want any canned responses, set this to just {}. PlaceholderAPI placeholders are supported for the values

MinecraftDiscordAccount:

MinecraftDiscordAccountLinkedConsoleCommands

commands to run when an account is linked

MinecraftDiscordAccountUnlinkedConsoleCommands

commands to run when an account is unlinked

MinecraftDiscordAccountLinkedRoleNameToAddUserTo

the name of a discord role to add a discord user to when they link their account

MinecraftDiscordAccountLinkedSetDiscordNicknameAsInGameName

whether or not to set the discord user's nickname to their in-game account name

MinecraftDiscordAccountLinkedAllowRelinkBySendingANewCode

allows sending a new code to the bot to unlink and relink with the new code

GroupRoleSynchronization:

GroupRoleSynchronizationRoleIdsToSync

these are Discord role IDs that you want to be synchronized from Minecraft to Discord. If a role ID is not here, the permission for it (discordsrv.sync.[role id]) will not work. To get your Discord guild's role IDs, run "/discord debug" and look at the first section or right click on a role in someone's profile

GroupRoleSynchronizationCycleTime

amount of minutes between repeatedly triggering synchronization for all online players

GroupRoleSynchronizationRemoveRolesOnUnlink

whether or not to remove synced roles from a Discord user when unlinking accounts

ServerWatchdog:

ServerWatchdogEnabled

whether or not the watchdog is enabled at all

ServerWatchdogTimeout

time in seconds that need to elapse before the watchdog takes action (Spigot's crash detection uses 60 for this) the minimum for this value is 10

ServerWatchdogMessageCount

the amount of times ServerWatchdogMessage is sent. useful if you really want to make sure you know something's up

BanSynchronization:

BanSynchronizationDiscordToMinecraft

whether or not to ban people on the Minecraft server if they get banned from the Discord server

BanSynchronizationDiscordToMinecraftReason

the message to be used as the ban reason for banning players from the Minecraft server

BanSynchronizationMinecraftToDiscord

whether or not to ban people on the Discord server if they get banned from the Minecraft server

linking

Enabled | Listener priority | Bypass names | Whitelisted players bypass check | Not linked message

Subscriber role (Require subscriber role to join, Subscriber roles, Require all of the listed roles, Kick message)

Messages (DiscordSRV still starting, Failed to find subscriber role, Failed for unknown reason, Kicked for unlinking)

Enabled

Enable/Disable the Require linked account to play module.

Listener priority

Control the priority Require linked account to play's join listener is on.

Bypass names

Minecraft IGNs to always allow (overrides )

Whitelisted players bypass check

Whether to bypass players listed in the vanilla whitelist or not.

Not linked message

The kick message that gets displayed if the user's account isn't linked Placeholders:

  • {BOT} The Bot's name. [DiscordSRVBot#1234]
  • {CODE} The verification code required for DMing the bot. [4321]

Subscriber role:

Optionally require people to not only be linked but to have one/all specified role[s].

Require subscriber role to join

Enable/Disable requiring a discord role to join Minecraft server.

Subscriber roles

The roles required to join the server.

Require all of the listed roles

Enable/Disable requiring all listed roles. When false, only one of the roles listed in Subscriber roles is required.

Kick message

The message that gets displayed when a user gets kicked for not having a/all role/s.

Messages:

DiscordSRV still starting

What gets displayed as the kick reason if someone attempts to join before DiscordSRV loads up.

Failed to find subscriber role

What gets displayed as the kick reason if the required role[s] were not found on the server.

Failed for unknown reason

What gets displayed as the kick reason if an error occurs.

Kicked for unlinking

What gets displayed as the kick reason if the player unlinks in-game.

messages

DiscordToMinecraft.. (ChatMessageFormat, ChatMessageFormatNoRole, AllRolesSeparator)
MinecraftChatToDiscordMessage.. (Format, FormatNoPrimaryGroup)
ChatChannelHookMessageFormat | DiscordConsoleChannelFormat | DiscordChatChannelConsoleCommandNotifyErrorsFormat
DiscordChatChannelListCommand.. (FormatOnlinePlayers, FormatNoOnlinePlayers, PlayerFormat, AllPlayersSeparator)
MinecraftPlayer.. (JoinMessageFormat, FirstJoinMessageFormat, LeaveMessageFormat, DeathMessageFormat, AchievementMessagesFormat)
ChannelTopicUpdater.. (ChatChannelTopicFormat, ConsoleChannelTopicFormat, ChatChannelTopicAtServerShutdownFormat, ConsoleChannelTopicAtServerShutdownFormat)
DiscordCommandFormat
DiscordChatChannelServer.. (StartupMessage, ShutdownMessage)
ServerWatchdogMessage | CodeGenerated | DiscordAccountLinked | MinecraftAccountLinked

DiscordToMinecraft:

Placeholders:

  • %allroles% All the user's roles separated by DiscordToMinecraftAllRolesSeparator [Owner | Developer | Boss man]
  • %message% The Message content. [Hello!]
  • %toprole% The user's highest ranking role. [Owner]
  • %toproleinitial% The first initial of the user's highest ranking role. [O]
  • %toprolecolor% The approximate color of that role defined in DiscordChatChannelColorTranslations [&4]
  • %username% The user's username/nickname if set [scarsz]
  • %channelname% The name of the Discord channel the message is coming from. []
DiscordToMinecraftChatMessageFormat

The format used when sending messages from Discord to Minecraft.

DiscordToMinecraftChatMessageFormatNoRole

The format used when sending messages from Discord to Minecraft for the user with no roles.

DiscordToMinecraftAllRolesSeparator

The separator used in between roles in %allroles%

MinecraftChatToDiscordMessage:

Placeholders (PlaceholderAPI supported):

  • %username% raw player username
  • %displayname% display name from things like nicknames
  • %message% message content
  • %primarygroup% the name of the user's primary group
  • %world% name of world player is in
  • %worldalias% alias of world player is in via Multiverse-Core
  • %date% current date & time
  • %channelname% the name of the channel that the message was sent in, if the message was sent in a channel at all
MinecraftChatToDiscordMessageFormat

the format used when sending messages from Minecraft to Discord.

MinecraftChatToDiscordMessageFormatNoPrimaryGroup

used in place of MinecraftChatToDiscordMessageFormat when no primary group for the player was found.

ChatChannelHookMessageFormat

This is a special message that's only used when a supported chat channel plugin is hooked. It modifies what the message would be like in-game to include information related to the channel the message is from.
Placeholders:

  • %channelcolor% the color character corresponding to the channel
  • %channelname% the literal name of the channel, usually the name only the server sees internally
  • %channelnickname% the formal nickname of the channel, usually the name of the channel that players see
  • %message% the message after processing through DiscordToMinecraftChatMessageFormat/DiscordToMinecraftChatMessageFormatNoRole

DiscordConsoleChannelFormat

This is the format used when sending a line from the console to the console channel, if enabled
Placeholders:

  • %date% current date & time
  • %level% message severity level
  • %line% line from the console

DiscordChatChannelConsoleCommandNotifyErrorsFormat

Used when an error occurs with permissions for the player to run the command, not an error running the command itself. This is sent as a PM to the user.
Placeholders:

  • %user% the name of the user that tried running the command.
  • %error% the reason for the error.

DiscordChatChannelListCommand [Format]:

DiscordChatChannelListCommandFormatOnlinePlayers

the message at the beginning of the list, before all of the player names.

DiscordChatChannelListCommandFormatNoOnlinePlayers

used instead for when no players are online

DiscordChatChannelListCommandPlayerFormat

the format of how each player should appear in the list
Placeholders (PlaceholderAPI supported):

  • %username%: raw player username
  • %displayname%: display name from things like nicknames
  • %primarygroup%: the name of the user's primary group
  • %world%: name of world player is in
  • %worldalias%: alias of world player is in via Multiverse-Core
DiscordChatChannelListCommandAllPlayersSeparator

the separator used in between players

MinecraftPlayer:

Placeholders (PlaceholderAPI supported):

  • %displayname% display name from things like nicknames
  • %username% raw player username
  • %date% current date & time
MinecraftPlayerJoinMessageFormat
  • %message% join message as seen in-game The message that gets broadcasted when a player joins the server.
MinecraftPlayerFirstJoinMessageFormat
  • %message% join message as seen in-game The message that gets broadcasted when a player joins for the first time.
MinecraftPlayerLeaveMessageFormat

The message that gets broadcasted when a player leaves.

MinecraftPlayerDeathMessageFormat

The message that gets broadcasted on player death.
Placeholder specific to this option:

  • %deathmessage% Raw death message.
MinecraftPlayerAchievementMessagesFormat

The message that gets broadcasted when a player gets an achievement. Placeholder specific to this option:

  • %achievement% Title of the achievement/advancement.

ChannelTopicUpdater Format:

Placeholders:

  • %playercount% current player count
  • %playermax% maximum player count
  • %date% current date
  • %totalplayers% total amount of players to ever join the main world
  • %uptimemins% amount of minutes since DiscordSRV has started
  • %uptimehours% amount of hours since DiscordSRV has started
  • %motd% motto of the day of the server
  • %serverversion% server version such as Spigot-1.9
  • %freememory% free memory of the JVM in MB
  • %usedmemory% used memory of the JVM in MB
  • %totalmemory% total memory of the JVM in MB
  • %maxmemory% max memory of the JVM in MB
  • %freememorygb% free memory of the JVM in GB
  • %usedmemorygb% used memory of the JVM in GB
  • %totalmemorygb% total memory of the JVM in GB
  • %maxmemorygb% max memory of the JVM in GB
  • %tps% average TPS of the server
ChannelTopicUpdaterChatChannelTopicFormat

message to set the chat channel's topic to every X seconds

ChannelTopicUpdaterConsoleChannelTopicFormat

message to set the console channel's topic to every X seconds

ChannelTopicUpdaterChatChannelTopicAtServerShutdownFormat

message to set the chat channel's topic when the server shuts down

ChannelTopicUpdaterConsoleChannelTopicAtServerShutdownFormat

message to set the console channel's topic when the server shuts down

DiscordCommandFormat

This is the message sent to players when they run "/discord". It's recommended to leave command syntax as a part of this.

DiscordChatChannelServer:

DiscordChatChannelServerStartupMessage

message to be sent when server starts; leave blank to disable

DiscordChatChannelServerShutdownMessage

message to be sent when server shuts down; leave blank to disable

ServerWatchdogMessage

The watchdog constantly monitors the last time your server performed a game tick. If the time since the last tick goes above the set interval in seconds, Discord messages can be triggered.
Placeholders:

  • %guildowner% The guild owner's mention tag.
  • %date% The date & time when the message gets sent.

CodeGenerated

Placeholders:

  • %code% the code generated for the player to link their account with
  • %botname% the name of the bot on Discord

DiscordAccountLinked

Placeholders:

  • %name% the name of the Minecraft player that the user's Discord account was linked to
  • %uuid% the uuid of the Minecraft player that the user's Discord account was linked to

MinecraftAccountLinked

Placeholders:

  • %id% the discord id of the Discord user that the user's Minecraft account was linked to
  • %username% the discord name of the Discord user that the user's Minecraft account was linked to

voice

Voice enabled | Tick speed | Voice category | Lobby channel

Network (Strength, Falloff, Allow voice activation detection)

Voice enabled

Enables/Disables the voice module.

Tick speed

The tick delay between network updates.

Voice category

The category that will handle voice channels in

Lobby channel

The voice channel (inside the voice category) that people will be moved to

Network

Strength

Maximum distance between players in order to be connected.

Falloff

Once a player has joined a network, they can be Strength + Falloff blocks away from the other player before being disconnected.

Allow voice activation detection

Whether or not to allow VAD in voice channels.

References

  1. Requires a server restart for changes to take effect.
    [⁽¹⁾]: Configuration#References

The DiscordSRV wiki has moved to docs.discordsrv.com

Clone this wiki locally