Configuration file
The configuration file is located on the config/world-compomment.json. It will be created automatically after running once.An example of its content:
{{"ImageuploadConfig": "SMMS: XXXXXXXX;"
}
All fields are optional, and the content that does not want to configure is omitted.
Diagram setting
ImageuploadConfig: Image upload configuration.This item must be configured on the server or in a single game instance to attach screenshots to the comments.
A string, or a string array, set the map bed website you want to use.When specified multiple, the client will try one by one.
When using on the server, just configure it on the server, the client will automatically obtain this configuration from the side of the server and upload pictures to it.
Now you cannot store the picture directly in the archive.
This is because the designComment design is mainly used for multiplayer servers, and sending pictures directly through the Minecraft game connection may occupy valuable server bandwidth, resulting in a play experience stuck.
"SMMS:
Upload to https://smms.app.Register an account over there to get the API key.
"IMGLOC:
Upload to https://imgloc.com.Register an account over there to get the API key.
"lsky:
Uploaded to the LSky Pro instance (https://github.com/lsky-rg/lsky-pro).Their documents have related tutorials for installation and API key configuration.
There are plans to support imgur, but have not finished writing.
Mark class comment allowed range
There are four "feelings" categories, and four "tags" classes in this module.The mark -category comment will be displayed regardless of whether the player is opened.
AllowMarkerusage
"OP"
Only allow OPs (specifically, players with 3 levels) to send mark -category comments.
"Creative"
Only players who are now creating a model will send markings.This is the default setting.
"all"
All players can send markings.
(Advanced content) Redis synchronous settings
{{Elastic
"Syncrole": "Host",
"Redisurl": "Redis: // localhost: 6379"
}
Syncrole: Simultaneously commented through Redis between multiple servers.This is a customized function for Teacon 2023. They have a special distributed load balancing configuration (multiple sub -servers).
Host: This server is the host, and the comments are stored in its archive.
SubordInate: This server does not store comments in its archive, but comments from the host.
Redisurl: URL of the Redis server for synchronous comments (according to the grammar of lettuce).
(Advanced content) HTTP webhook comments upload
{{Elastic
"Uplinkurl": "https://example.Domain/teacon2023/subnoteica_uplink.php",
"UplinkAuthkey": "xxxxxxxxx"
}
Uplinkurl: Url used to synchronize comments in the form of web server's uplink script.If you use syncrole, each comment will be sent only once by the host server.
This feature is used to synchronize the comment to the web server so that they can be displayed on the website.The script will receive a post request with the following content:
{{"ID": 1166045306574225400,
"Timestamp": 1698077265000,
"Level": "Minecraft: Overworld",
"LOCATION": [0, 0, 0],,,
"Initiator": "00000000-0000-0000-0000000000",
"InitiatorName": "", "",,,
"MessageType": 1,
"Message": "I hope the domestic community is getting better and better!!!!!!!
"Image": {
"Url": "",
"Thumb": "" "
},
"Like": 0,
"Deleted": false
}
The request will include an Authorization header at the same time, which is similar to the "Nex-HMAC-SHA1 Signature = xxxxxxxx". The signature value is the result of the request body as a key as a key for SHA1 HMAC.
UplinkAuthkey: The key to HMAC signature for upward request.This is used to determine that the data is indeed sent by the server, avoiding anyone to the receiving terminal junk data.
Environment variable
All configuration items can also be set up by environmental variables.For example, ImageupLoadConfig can use Subnoteica_image_upload_config settings.If you are using Kubernetes to start the server, this configuration may be more convenient.