-
Notifications
You must be signed in to change notification settings - Fork 0
JSON Filter
OmitFiles uses JSON to define the tokens, filters, and file paths used for filtering. The required elements are very simple and generally self-explanatory.
[{
"file": "plugins/DiscordSRV/config.yml",
"filter": "&Replacement1&",
"key": "Secret_Token1"
},
{
"file": "plugins/DiscordSRV/config.yml",
"filter": "&Replacement2&",
"key": "Secret_Token2"
},
{
"file": "plugins/DiscordSRV/config.yml",
"filter": "&Replacement3&",
"key": "Secret_Token3""
}
]
The file element is your configuration files relative path from the directory containing the jar. For use in Minecraft Spigot, the easiest setup is to place the OmitFiles jar in the main server directory that contains your server jar then each config file would look like this plugins/<PluginFolder>/config.yml or plugins/<PluginName.yml>.
The filter element is what OmitFiles will replace your token with. This is also the value that will appear if you commit the files to git after using the jar. This has to be a unique value within the document. If you find anything you don't know how to filter then check out this page for some of the common edge cases.
The key element should be the secret token or password that the plugin or program uses to run. This could be the password to a database, API key, or bot token. This will be what is shown as you start the server/program and will not be committed to git if you use the program correctly.