Commands from CMI
nisemup opened this issue ยท 2 comments
I have a problem with commands. As I understand DiscordSRV only uses standard Minecraft commands as a trigger. (I'm pretty sure I'm wrong)
Is there any way I can use commands from another plugin in alerts.yml (CMI in my case)? I just need to get arguments from other commands.
Alerts is not limited to Minecraft's commands, you can use the commands of any plugins in alerts.
Let me know if you've figured out a way to get custom (/cmi aliaseditor) made cmi commands for alerts. I am trying to see if I can build a collection for github.
Using a conditional, this seems to be working.
- Trigger: PlayerCommandPreprocessEvent
Channel: team
Conditions:
- "(#command.split(\"\\s+|$\")[0].equals(\"cmi\"))"
- "(#command.split(\"\\s+|$\")[1].equals(\"msg\"))"
Embed:
Color: "#000001"
Author:
ImageUrl: "{embedavatarurl}"
Name: '**MSG SPY**'
Description: "Message by `{username}`, Location: `/tppos %player_x% %player_y% %player_z% #{world}` \n ```\n/${#command}```"