Realm Bot Flag Relay (Not Yet Released)
​
​
​
​
What does this do?​
​
Thanks to our collaboration with RealmBot, UAC is now the first Minecraft Addon that can have logs sent to discord. When a player gets flagged by the Anti-Cheat, UAC will send that information to RealmBot, which then gets relayed to a discord channel of your choice. This allows for your realm managers to know what is happening even while not in-game.
UAC has a few types of Relay Flag types which are sorted by color.
Cyan
This means the flag was nothing threatening. This is mostly used for when staff have done something in-game that may be worth making logs for.
Yellow
This means a player was caught doing something by UAC. Details of what will be specified in the log. This is also triggered when UAC core systems may have prevented something from happening. For example, when emergency lag clear is triggered.
​
Red
This means the flag was something serious. This is mostly used for player bans, or if UAC protected the realm from being terminated by WatchDog.
How does this work
​
For this system, RealmBot is listening for subtitle packets. This means, if RealmBot's dummy player in-game has a subtitle displayed to it, it will then capture the message in that subtitle.
Specifically, the beginning of that message, or string, will need to begin with RB1337: This will be called the Listening Code because it is something RealmBot is specifically listening for. The reason there's a listening code, is so that RealmBot can filter out other subtitle messages being displayed to it that may have nothing to do with a Anti-Cheat flag.
​
When RealmBot sees one of these specific messages displayed to it, the bot then goes to work on picking that message apart. Inside that message will contain information such as how to create the discord embed, the actual flag information itself, ect. The bot then reconstructs that information to be sent as a discord message to a channel that the Bot Owner has decided on.
​
For Developers
​
Here is the open sourced example of a function which would add RealmBot Relay Support to your project.
In this example, UAC is first checking to see if the RB Relay Module is on before continuing.
We then assign a default color incase a color parameter is not used when calling the function.
RealmBot will now give itself the rb1337 tag, which makes it easier to filter which player is Realm Bot's dummy player. When we find that player we of course set their subtitle which starts with the listening code.
By using JSON.stringify we are able to pass a string to RealmBot that will be easier for the Discord API to use.
The first 'url' property that is defined will be the link the discord member is sent to if they click on the title of the discord embed message.
​
The 'anticheat' property will show up in the title of the message, which will allow you to identify that this flag came from specifically your project. This is not really a traditional discord embed property but the bot uses it to give your embed message some Identity.
The 'description' will be the main text that is inside the discord embed message. This is where we want to put all the details of your message inside of. We've made it that our message parameter is set inside this property along with logic that takes out any characters inside the string that may mess with the script or RealmBot's ability to parse that json string to discord.