Plugin name: ChatTriggers Plugin info: I want a plugin that when a player execute a word in his chatline there specific Text/Cmd will appear to his chat. Example: When player do a i need food ChatTrigger will trigger the "food" and will excute /feed $player and there will be a text Your now ready to run I want to make it config so its easy for me to make a triggers. permission: nope commands: nope
Let me confirm, basically you want a plugin that in config has a word. If that word is said in chat, a certain command will execute? If I'm correct, here's the issue; do you want the speaker to execute it, local staff, or console?
@BlueCrafter12 Do you want it run like @Agentleader1 is saying (player, staff, or console). I might be able to make this... I assume you would just want to have a configuration file that you can enter a word or phrase into and if it equals what the player said in chat then execute a command that pairs up with the phrase. I would not be able to make this today, or tomorrow, but probably this weekend. Full-time jobs...
If you don't want the plugin made ok, but I'm willing to make this. Would you mind giving a response that shows you care this plugin is made? Yea, to what?
@ForsakenRealmz Just a note, I would imagine he'd like it so that he can use more than just one word of phrase. So a list of them
That's exactly what I planned on doing. Just having a simple list and he can add however many phrases/words he wants to it. When the player uses chat then I'll loop through the list and if they're any matches execute the command he has paired up with it. @BlueCrafter12 The plugin has been finished. You can download it below. There is a little README.txt to always have the permission node and command. I added a reload command so if you edit the config file you won't have to reload the entire server, but just that plugin. Commands: - /ChatTrigger reload /ct reloadPermissions: - ChatTrigger.reload Download: https://www.dropbox.com/sh/98ehw5bhzbp5nd2/AAATE8fu5oFR52Wo8zY1s5_Ta?dl=0 EDIT by Timtower: merged posts
See this: http://www.spigotmc.org/resources/chattriggers.7624/ Commands & Permissions: /chattriggers = chattriggers.reload Reload the config
@BlueCrafter12 Not a problem. I'll have another version for you tomorrow. I'll make it so you don't have to worry about making the phrases lowercase in the config file, but instead you can go crazy with capitals if you want to. Also, I should mention how manage the config file. I guess it could be tricky without me mentioning it... So... Code: phrases: #The part before the semi-colen ';' is the phrase and the part after is the command - feed me; feed <player> - heal me; heal <player> - give me stuff; give <player> 1 50 @BlueCrafter12 Here is version 3.0. It allows you to have more customization in the configuration file. Don't feel the pressure of accidentally having a capital in the message you are looking out for, as it will no longer matter what case it is. Also, just added a message option. Copy your current configuration file, and then delete it. Reload the server to create the new configuration file, and you will notice how to enter in messages to send to players once they say the correct phrase. If the message field is left empty then it will not send a message. Download: https://www.dropbox.com/sh/98ehw5bhzbp5nd2/AAATE8fu5oFR52Wo8zY1s5_Ta?dl=0
@ForsakenRealmz Can it detect like when i say i need food and im hungry need food,Can it detect the word "food" in that sentence? its just a example.
@BlueCrafter12 it can detect any word that you want it to. If you look above I give an example config file. The part before the semi-colon is the message that it will look for when a player talks. If the message contains what you put in the config file then it will execute the command, which is located after the semi-colon. So, to answer your question... If you put "food; food <player>" then whenever a player says the word "food" in chat it will feed them. Now, these commands are executed from the console, so the command has to be able to target the player or it will just run in the console and show the console how to do something (warps). I'm working on a method to make it so it can handle all commands.