Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Config Explanation

天使アシュリー edited this page Jun 22, 2019 · 9 revisions

IMPORTANT INFORMATION

Cross Chat uses Brackets Placeholers, so all placeholders including those from PlaceholderAPI must be written with brackets
Example: {mcmmo_power_level}, {luckperms_lowest_group_by_weight}, etc.

Discord to Minecraft does NOT support placeholders from PlaceholderAPI!


Quick Intro to the "config.yml"

Cross Chat uses the most a common config system within the Minecraft coding community.
Since the support from SpigotAPI makes it easy to use this without needing to rewrite a lot for nothing.
So I hope we can safely assume, that this won't be your first time editing a .yml file.

If this is the case, than I wanna ask you to read yourself a bit into this
[Complete idiot's introduction to yaml] guide!
This will give you some details on how YAML (.yml) files work and what is possible.

Config breakdown!

We're now going to break down the config.yml so it will be easier to find the information you're searching for. If this is the first time you're using Cross Chat make sure to read everything.

The config file has at this current moment sections discord and message-formats.
The Discord section is the most important section, since most of the settings here are required.
The second section is Message-Formats, here you can setup a custom format for the messages that people will see on Discord and Minecraft, this is not required but you will end up customizing it.

"discord" section

token

This is an important and secret token, do not share this with ANYONE! The token can be obtained by creating a bot on the Discord Developers portal. Visit: discordapp.com/developers for more information. This field is required to make the plugin work.

channels

These are the channels for the cross-chat feature, and are also required. These need to be Discord Channel ID's, you can obtain them by Right Clicking the channel and click on "Copy ID" (if you do not see this option, make sure to enable: "Developer Mode" by going to App Settings > Appearance > Advanced and click Developer Mode.

Once you obtained the Channel ID's you can paste them within the quotation marks on the settings.
Make sure these are text-channels, I hope you understand that text can not be sent to voice-channels.

required_role

This is the first not required setting, but can be a really important one for some servers. By default all message in the "discord-to-minecraft" channel will be sent to Minecraft, but this setting can prevent that, if you for example only want people with a specific role to be able to sent message over to Minecraft.

A Discord Role ID can be obtained by typing @ROLENAME and before you hit enter, you put a backslash infront of it.
So the input field will look like this "\@ROLENAME", if you did that, you only have to hit enter.
If all went correct, you should have a message with something similar to "<@&5874948636554918112>".
Now to get the ID of the role, simply just copy only the numbers in this case: "5874948636554918112".
And all you have to do now is paste in within the quotation marks behind 'required_role:'.
So you get something like this: required_role: "5874948636554918112" .

inherit_role_color

This is a work-in-progress function and is required to be false or true.
What this setting does is simple, yet the whole code behind it is not!

In Discord one can setup a color to a role, so everyone in the discord guild can see by the name which role they have by the color, I wanted to make a possibility to make it visible for people in Minecraft to also see these colors on the name of the person using the 'discord-to-minecraft' channel.

So with some help and lots of brain farting, I implemented a function that 'converts' the Discord role color to a valid Minecraft color character, so when your role in Discord is Blue, your name get the closest color (blue or dark_blue) in Minecraft.

bot_activity

enabled

update_time

message

url

"message-formats" section

discord

minecraft