MatterLink/README.md

168 lines
5.1 KiB
Markdown
Raw Normal View History

2018-06-28 04:16:44 +00:00
[![Discord](https://img.shields.io/discord/176780432371744769.svg?style=for-the-badge&label=%23ai-dev&logo=discord)](http://discord.gg/Fm5EST)
[![Discord](https://img.shields.io/discord/342696338556977153.svg?style=for-the-badge&logo=discord)](https://discord.gg/hXqNgq5)
[![Download 1.12.2](https://curse.nikky.moe/api/img/287323?logo&style=for-the-badge&version=1.12.2)](https://curse.nikky.moe/api/url/287323?version=1.12.2)
[![Jenkins](https://img.shields.io/jenkins/s/https/ci.elytradev.com/job/elytra/job/MatterLink/job/master.svg?style=for-the-badge&label=Jenkins%20Build)](https://ci.elytradev.com/job/elytra/job/MatterLink/job/master/lastSuccessfulBuild/artifact/)
[![Patreon](https://img.shields.io/badge/Patreon-Nikkyai-red.svg?style=for-the-badge)](https://www.patreon.com/NikkyAi)
# MatterLink
2018-01-24 14:40:38 +00:00
- [Downloads](#downloads)
- [Dependencies](#dependencies)
- [Features](#features)
- [Setup](#setup)
A Matterbridge endpoint for MC servers!
2018-02-15 22:56:54 +00:00
THIS MOD REQUIRES YOU TO ALSO RUN A MATTERBRIDGE RELAY
https://github.com/42wim/matterbridge
Chat with us on IRC: [#matterlink @ irc.esper.net](irc://irc.esper.net/matterlink)
2018-02-21 21:34:11 +00:00
## Downloads
[![Github All Releases](https://img.shields.io/github/downloads/elytra/MatterLink/total.svg?style=for-the-badge&label=Github%20Releases&logo=github)](https://github.com/elytra/MatterLink/releases)
[![Jenkins](https://img.shields.io/jenkins/s/https/ci.elytradev.com/job/elytra/job/MatterLink/job/master.svg?style=for-the-badge&label=Jenkins%20Build)](https://ci.elytradev.com/job/elytra/job/MatterLink/job/master/lastSuccessfulBuild/artifact/)
[![Files](https://curse.nikky.moe/api/img/287323/files?logo&style=for-the-badge&version=1.12.2)](https://minecraft.curseforge.com/projects/287323/files)
[![Download 1.12.2](https://curse.nikky.moe/api/img/287323?logo&style=for-the-badge&version=1.12.2)](https://curse.nikky.moe/api/url/287323?version=1.12.2)
[![Download 1.9.4](https://curse.nikky.moe/api/img/287323?logo&style=for-the-badge&version=1.9.4)](https://curse.nikky.moe/api/url/287323?version=1.9.4)
## Dependencies
[![Forgelin Files](https://curse.nikky.moe/api/img/248453/files?logo&style=for-the-badge)](https://minecraft.curseforge.com/projects/248453/files)
2018-02-15 22:56:54 +00:00
## Features
### Custom bridge commands
2018-07-08 00:46:15 +00:00
includes pass-through to Minecraft commands!
Default commands: `help, tps, list, seed, uptime`
Commands are specified in JSON format as follows:
Passthrough command (executes the configured command from the MC server console)
2018-02-21 21:34:11 +00:00
```json
2018-07-08 00:46:15 +00:00
{
"tps": {
"type": "PASSTHROUGH",
"execute": "forge tps",
"permLevel": 0,
"help": "Print server tps",
"allowArgs": false
}
2018-02-21 21:34:11 +00:00
}
```
2018-02-21 21:34:11 +00:00
Response command
2018-02-21 21:34:11 +00:00
```json
2018-07-08 00:46:15 +00:00
{
"uptime": {
"type": "RESPONSE",
"response": "{uptime}",
"permLevel": 1,
"help": "Print server uptime",
"allowArgs": false
}
}
```
### Acount Linking
To link your chat account to your minecraft uuid
execute `!auth Username`
make sure to use the proper username and command prefix, the system will then guide you through
internally the identity links are stored like so:
```json
{
/* username: NikkyAi */
"edd31c45-b095-49c5-a9f5-59cec4cfed8c": {
/* discord id */
"discord.game": [
"112228624366575616"
]
}
2018-02-21 21:34:11 +00:00
}
2018-02-15 22:56:54 +00:00
```
### Command permissions
2018-07-08 00:46:15 +00:00
Higher numbers mean more permissions. Configured per uuid.
2018-02-21 21:34:11 +00:00
```json
{
2018-07-08 00:46:15 +00:00
"edd31c45-b095-49c5-a9f5-59cec4cfed8c": 9000
2018-02-21 21:34:11 +00:00
}
2018-02-15 22:56:54 +00:00
```
2018-07-08 00:46:15 +00:00
### Reload
Edit and reload the config file without restarting the server!
2018-02-15 22:56:54 +00:00
```
2018-07-08 00:46:15 +00:00
/ml <connect|disconnect|reload>
2018-02-21 21:34:11 +00:00
connect: Connects the MC chat to the MatterBridge server
disconnect: Disconnects the chat from the MatterBridge server
reload: Disconnects, reloads the config and custom command files,
then reconnects.
2018-02-15 22:56:54 +00:00
```
## Setup
2018-02-21 21:34:11 +00:00
Requires the matterbridge config api section to be setup along these lines:
2018-02-12 16:41:07 +00:00
2018-07-08 00:46:15 +00:00
### Local
If ou know the matterbridge will run on the same machine as the Minecraft Server
```
[api]
[api.local]
2018-07-08 00:46:15 +00:00
BindAddress="127.0.0.1:4242" // Listens only for localhost
#OPTIONAL (no authorization if token is empty)
2018-07-08 00:46:15 +00:00
Token="" # Token left empty
Buffer=1000
RemoteNickFormat="{NICK}"
ShowJoinPart = true
```
2018-02-12 16:41:07 +00:00
2018-07-08 00:46:15 +00:00
With this you need no extra configuration steps.. just run matterbridge and then start the minecraft server (or reload matterlink with command if it runs already)
### Remote
If the matterbridge runs on a different machine
```
[api]
[api.local]
BindAddress="0.0.0.0:4242"
#OPTIONAL (no authorization if token is empty)
Token="mytoken"
Buffer=1000
RemoteNickFormat="{NICK}"
ShowJoinPart = true
```
you need to know the ip / domain of the matterbridge and the token used,
enter them in the ´connection' section in the config and reload matterlink
### Sample
2018-02-12 16:41:07 +00:00
2018-02-15 22:56:54 +00:00
Install matterbridge and try out the basic sample:
2018-02-12 16:41:07 +00:00
```
go get github.com/42wim/matterbridge
2018-02-21 21:34:11 +00:00
mv matterbridge-sample.toml matterbridge.toml
2018-02-12 16:41:07 +00:00
matterbridge
```
2018-07-08 00:46:15 +00:00
now start the server with matterlink (and forgelin) in the mods folder
2018-02-21 21:34:11 +00:00
and then [RTFM!!!](https://github.com/42wim/matterbridge#configuration) and configure all your needed gateways, endpoints etc
powered by wishful thinking