v0.1.0 Documentation
NOTE: THIS PAGE IS OUTDATED, AND ONLY APPLICABLE TO VERSION 0.1.0 OF THE PLUGIN |
---|
This is the documentation for version 0.1.0 (old parameter syntax). For the newest documentation, go here
-
Download plugin and add it into the plugins folder
-
Run server to create the plugin config file
-
Open discord and go to the channel that you want the events to be logged to
-
Open the channel settings
-
Go to 'Integrations'
-
Click the 'Create Webhook' button and name your webhook whatever you want
-
Press the 'Copy Webhook Url' button and paste the url under the 'webhooks' section in the config file
Your config file should now look something like this
webhooks: - https://discord.com/api/webhooks/id/token
Aaand the setup is done! You can now further customize DiscordLog by looking into the next section.
This section explains all the options available in the DiscordLog config file.
A list of all the discord webhooks to log the events to. DiscordLog supports multiple webhooks in a single server.
Example:
webhooks:
- https://discord.com/api/webhooks/id/token
- https://discord.com/api/webhooks/id2/token2
A list of all the events to log. Accepted list elements are
player-command-execution
console-command-execution
player-join
player-disconnect
player-kick
player-death
player-respawn
player-kill-entity
player-kill-named-entity
Warning
If both
player-kill-entity
andplayer-kill-named-entity
are on the list, when a named mob dies both events will be logged!
Example:
logged-events:
- player-command-execution
- console-command-execution
- player-join
- player-disconnect
# - player-kick This line is commented out, so the plugin will not log players being kicked from the server
- player-death
- player-respawn
- player-kill-entity
- player-kill-named-entity
A section containing all the log message formats (they can contain discord markdown!). The values in this section are
-
player-command
- connected toplayer-command-execution
event. First%s
represents player, second - the command that was sent. -
console-command
- connected toconsole-command-execution
event.%s
represents the command that was sent. -
player-join
- connected toplayer-join
event.%s
represents the player. -
player-disconnect
- connected toplayer-disconnect
event.%s
represents the player. -
player-kick
- connected toplayer-kick
event.%s
represents the player. -
player-death
- connected toplayer-death
event.%s
represents the player. -
player-respawn
- connected toplayer-respawn
event.%s
represents the player. -
player-kill-entity
- connected toplayer-kill-entity
event. First%s
represents the player, second - the entity type. -
player-kill-named-entity
- connected toplayer-kill-named-entity
event. First%s
represents the player, second - the entity type, and third - the entity name
Example:
messages:
player-command: Player **%s** executed the command `%s`
console-command: CONSOLE executed the command `%s`
player-join: Player **%s** joined the server!
player-disconnect: Player **%s** disconnected from the server.
player-kick: Player **%s** was kicked from the server!
player-death: Player **%s** died!
player-respawn: Player **%s** respawned.
player-kill-entity: Player **%s** killed entity of type **%s**
player-kill-named-entity: Player **%s** killed entity of type **%s**, named **%s**
Syntax: discordlog ( info | reload-config | test-webhooks )
Subcommands:
-
info
Displays information about the plugin
-
reload-config
Reloads the plugin config file
-
test-webhooks
Sends a test message to all webhooks
-
discordlog.reloadconfig
- grants access to/discordlog reload-config
-
discordlog.testwebhooks
- grants access to/discordlog test-webhooks