Logs user commands to chat, discord and more ! Everything configurable !
RocketMod: ClickMe
<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<LogAllCommands>true</LogAllCommands>
<BypassPermission>commandLogger.bypass</BypassPermission>
<LogToChat>true</LogToChat>
<ViewChatLogPermission>commandLogger.view</ViewChatLogPermission>
<DiscordWebhooks>
<DiscordWebhook url="https://discord.com/api/webhooks/XXXX/XXXX" enabled="false" />
<DiscordWebhook url="https://discord.com/api/webhooks/XXXX/XXXX" enabled="false" />
</DiscordWebhooks>
<CommandsToLog>
<Command name="ban" />
<Command name="kick" />
<Command name="warn" />
<Command name="item" />
<Command name="vehicle" />
<Command name="i" />
<Command name="v" />
<Command name="tp" />
<Command name="tphere" />
</CommandsToLog>
</Configuration>
<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Translation Id="ChatNotification" Value="[CommandLogger] {0} has execute the command {1} {2} !" />
</Translations>
- First reference CommandLogger.dll int your project
- Create a class that inherits the ICommmandLogger interface. It will inherit a log method that you will use to log commands in your custom command logger
- Instanciate that class
- Make sure/wait until the CommandLogger plugin has been loaded
- Add to the command loggers your own logger. Use
Feli.RocketMod.CommandLogger.Plugin.Instance.CommandLoggers.Add(your command logger class);