Okay, so i would like a plugin where, if you say something like "Hello, im from planet minecraft, please give me OP to review your server" A fake chat will pop up with the name of "Server" Or something saying something like "Oh, gr8, plz rate the server 69/420" Just something stupid like that. Config should maybe be something like: ChatInput: - (input text here) ChatOutput - (input text here) I dont know, something like that. Thanks, Adam. E: If there is a plugin for this, please link me!
@tkuiyeager1 Feel free, I only make them to the the threads solved quickly. I'd much rather other people make them and learn something from them instead if possible
@ObviouslyDuck here is the code: Code: package me.tkuiyeager1.customplugin; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener { @Override public void onEnable() { Bukkit.getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onChat(AsyncPlayerChatEvent e) { if (e.getMessage().contains(getConfig().getString("ChatInput"))) { e.getPlayer().sendMessage( ChatColor.translateAlternateColorCodes('&', getConfig() .getString("ChatOutput"))); } else { return; } } } and here is the config: Code: ChatInput: Hello, im from planet minecraft, please give me OP to review your server ChatOutput: "&2[Server] &rOh, gr8, plz rate the server 69/420" @iOnixS please go to the download link again, i updated it again
i dont think so becu lets say: Code: ChatInput: - test - test1 - test2 ChatOutput: - testoutput - test1output - test2output i dont know how to get the first and the second and the third and more like this, maybe someone else can do this